Search in sources :

Example 1 with WatcherException

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]);
}
Also used : OrbTrackerMemberData(org.goldenorb.client.OrbTrackerMemberData) OrbZKFailure(org.goldenorb.zookeeper.OrbZKFailure) ZooKeeperConnectionException(org.goldenorb.client.ZooKeeperConnectionException) ZooKeeperConnectionException(org.goldenorb.client.ZooKeeperConnectionException) IOException(java.io.IOException) WatcherException(org.goldenorb.client.WatcherException) NodeDoesNotExistException(org.goldenorb.client.NodeDoesNotExistException) WatcherException(org.goldenorb.client.WatcherException)

Aggregations

IOException (java.io.IOException)1 NodeDoesNotExistException (org.goldenorb.client.NodeDoesNotExistException)1 OrbTrackerMemberData (org.goldenorb.client.OrbTrackerMemberData)1 WatcherException (org.goldenorb.client.WatcherException)1 ZooKeeperConnectionException (org.goldenorb.client.ZooKeeperConnectionException)1 OrbZKFailure (org.goldenorb.zookeeper.OrbZKFailure)1