예제 #1
0
 /**
  * Called when an existing node has a child node added or removed.
  *
  * @param path full path of the node whose children have changed
  */
 public void nodeChildrenChanged(String path) {
   List<String> peers = refreshPeersList(path);
   if (peers == null) {
     return;
   }
   LOG.info(path + " znode expired, triggering peerListChanged event");
   for (ReplicationListener rl : listeners) {
     rl.peerListChanged(peers);
   }
 }
예제 #2
0
 /**
  * Called when a node has been deleted
  *
  * @param path full path of the deleted node
  */
 public void nodeDeleted(String path) {
   List<String> peers = refreshPeersList(path);
   if (peers == null) {
     return;
   }
   if (isPeerPath(path)) {
     String id = getZNodeName(path);
     LOG.info(path + " znode expired, triggering peerRemoved event");
     for (ReplicationListener rl : listeners) {
       rl.peerRemoved(id);
     }
   }
 }
예제 #3
0
 /**
  * Called when a node has been deleted
  *
  * @param path full path of the deleted node
  */
 public void nodeDeleted(String path) {
   if (stopper.isStopped()) {
     return;
   }
   boolean cont = refreshListIfRightPath(path);
   if (!cont) {
     return;
   }
   LOG.info(path + " znode expired, triggering replicatorRemoved event");
   for (ReplicationListener rl : listeners) {
     rl.regionServerRemoved(getZNodeName(path));
   }
 }