org.apache.s4.comm.topology
Class ClustersFromZK

java.lang.Object
  extended by org.apache.s4.comm.topology.ClustersFromZK
All Implemented Interfaces:
Clusters, org.I0Itec.zkclient.IZkStateListener

public class ClustersFromZK
extends java.lang.Object
implements Clusters, org.I0Itec.zkclient.IZkStateListener

Monitors all clusters


Constructor Summary
ClustersFromZK(java.lang.String clusterName, java.lang.String zookeeperAddress, int sessionTimeout, int connectionTimeout)
           
 
Method Summary
 Cluster getCluster(java.lang.String clusterName)
           
 void handleNewSession()
           
 void handleStateChanged(org.apache.zookeeper.Watcher.Event.KeeperState state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClustersFromZK

@Inject
public ClustersFromZK(java.lang.String clusterName,
                             java.lang.String zookeeperAddress,
                             int sessionTimeout,
                             int connectionTimeout)
               throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

handleStateChanged

public void handleStateChanged(org.apache.zookeeper.Watcher.Event.KeeperState state)
                        throws java.lang.Exception
Specified by:
handleStateChanged in interface org.I0Itec.zkclient.IZkStateListener
Throws:
java.lang.Exception

handleNewSession

public void handleNewSession()
                      throws java.lang.Exception
Specified by:
handleNewSession in interface org.I0Itec.zkclient.IZkStateListener
Throws:
java.lang.Exception

getCluster

public Cluster getCluster(java.lang.String clusterName)
Specified by:
getCluster in interface Clusters