51525354555657585960
@Override public synchronized void register(Peer peer) throws AlreadyRegisteredException, RemoteException { if(this.peers.contains(peer)) { throw new AlreadyRegisteredException(peer.getId()); } this.peers.add(peer); }