code: private void update(Peer peer) {
  		String id = peer.getId();
  		Peer previous = peers.get(id);
  		switch(previous.getStatus()) {
  			case ACTIVE:
  				timeouts.get(id).cancel(true);
  				timeouts.put(id, executor.schedule(new Deactivate(id), delay, MILLISECONDS));
  				break;
  			case INACTIVE:
  				peers.put(peer.getId(), peer);
  				timeouts.get(id).cancel(true);
  				timeouts.put(id, executor.schedule(new Deactivate(id), delay, MILLISECONDS));
  				notifyActive(peer);
  				break;
  			default:
  				String error = "Unexpected peer status: " + previous.getStatus();
  				throw new RuntimeException(error);
  		}
  	}
docs: Updates the given {@link Peer} to reflect its renewed activity
  
  @param peer