示例#1
0
 /**
  * Notifies on remove. Since listeners are never changed, this is thread safe.
  *
  * @param peerAddress The address of the removed peers
  */
 private void notifyRemove(PeerAddress peerAddress) {
   statistics.triggerStatUpdate(false, size());
   for (PeerMapChangeListener listener : peerMapChangeListeners) listener.peerRemoved(peerAddress);
 }
示例#2
0
 /**
  * Notifies on insert. Since listeners are never changed, this is thread safe.
  *
  * @param peerAddress The address of the inserted peers
  */
 private void notifyInsert(PeerAddress peerAddress) {
   statistics.triggerStatUpdate(true, size());
   for (PeerMapChangeListener listener : peerMapChangeListeners)
     listener.peerInserted(peerAddress);
 }