Пример #1
0
 private void notifyMeResponsible(final Number160 locationKey, PeerAddress newPeer) {
   for (ResponsibilityListener responsibilityListener : listeners) {
     responsibilityListener.meResponsible(locationKey, newPeer);
   }
 }
Пример #2
0
 /**
  * Notify if an other peer is responsible and we should transfer data to this peer.
  *
  * @param locationKey The location key.
  * @param other The other peer.
  * @param delayed Indicates if the other peer should get notified immediately or delayed. The case
  *     for delayed is that multiple non responsible peers may call this and a delayed call in that
  *     case may be better.
  */
 private void notifyOtherResponsible(
     final Number160 locationKey, final PeerAddress other, final boolean delayed) {
   for (ResponsibilityListener responsibilityListener : listeners) {
     responsibilityListener.otherResponsible(locationKey, other, delayed);
   }
 }
Пример #3
0
 /**
  * Notify if I'm responsible and something needs to change, i.e., to make sure that there are
  * enough replicas.
  *
  * @param locationKey The location key.
  */
 private void notifyMeResponsible(final Number160 locationKey) {
   for (ResponsibilityListener responsibilityListener : listeners) {
     responsibilityListener.meResponsible(locationKey);
   }
 }