use of org.goldenorb.client.WatcherException in project goldenorb by jzachr.
the class OrbTrackerMemberDataServiceImpl method getOrbTrackerMemberData.
/**
* Returns the data of the OrbTrackerMember nodes under the LeaderGroup node in ZooKeeper.
*/
@Override
public OrbTrackerMemberData[] getOrbTrackerMemberData() throws ZooKeeperConnectionException, WatcherException, NodeDoesNotExistException {
if (zk == null) {
try {
initializeZooKeeper();
memberDataContainer = new HashMap<String, OrbTrackerMemberData>();
} catch (Exception e) {
e.printStackTrace();
throw new ZooKeeperConnectionException(e);
}
}
// Initialize leader group watcher
if (leaderGroupWatcher == null) {
try {
initializeLeaderGroupMonitor();
} catch (OrbZKFailure e) {
throw new WatcherException(e);
}
}
return memberDataContainer.values().toArray(new OrbTrackerMemberData[0]);
}
Aggregations