/** * 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); } }
/** * 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); } } }
/** * 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)); } }