public void run() {
		this.done = false;
		
		int i = 0;
		Random r = new Random();
		
		while (!this.done) {
			if (maxEvents > 0 && i >= maxEvents) { this.done = true; }
			int rand = r.nextInt();
			
			if (rand % 2 == 0) {
				ObjectatEvent event = new ObjectatEvent(logger);
				event.setKey(this.baseKey + i);
				event.setEventDescription("Synthetic Event " + i);
				event.setFirst(new java.util.Date());
				try {
					events.addEvent(event);
					i++;
				} catch (Exception e) {
					// Something went wrong, exit loop
					this.done = true;
				}
			} else {
				
				int eventNumber = 0 + (int)Math.random() * ((i - 0) + 1);
				try {
					ObjectatEvent event = events.getAllEvents().get(eventNumber);
					events.removeEvent(event);
				} catch (Exception e) {
					// TODO
					// Better define exception, potentially ArrayIndexOutOfBounds?
				}
			}
			
			try {
				// Pause between synthetic event generation
				Thread.sleep(frequency);
			} catch (Exception e) {
				// Most likely interrupted, exit loop
				this.done = true;
			}
		}
	}