org.smallmind.cloud.cluster
Class ClusterHub
java.lang.Object
org.smallmind.cloud.cluster.ClusterHub
- All Implemented Interfaces:
- MulticastEventHandler
public class ClusterHub
- extends Object
- implements MulticastEventHandler
ClusterHub
public ClusterHub(Logger logger,
CapacityMeter capacityMeter,
String multicastIP,
int multicastPort,
int messageSegmentSize,
int updateInterval)
throws IOException,
CacheException
- Throws:
IOException
CacheException
addGossipClusterListener
public void addGossipClusterListener(ClusterInterface clusterInterface,
GossipClusterListener gossipClusterListener)
removeGossipClusterListener
public void removeGossipClusterListener(ClusterInterface clusterInterface,
GossipClusterListener gossipClusterListener)
getClusterManager
public ClusterManager getClusterManager(ClusterInterface clusterInterface)
addClusterManager
public void addClusterManager(ClusterManager clusterManager)
throws ClusterManagementException
- Throws:
ClusterManagementException
addClusterService
public void addClusterService(ClusterService clusterService)
removeClusterService
public void removeClusterService(ClusterInstance clusterInstance)
getClientClusterInstances
public ClusterInstance[] getClientClusterInstances()
getClientClusterInstances
public ClusterInstance[] getClientClusterInstances(ClusterInterface clusterInterface)
hasServiceCluster
public boolean hasServiceCluster(ClusterInterface clusterInterface)
fireStatusUpdate
protected void fireStatusUpdate(ClusterInstance[] clusterInstances)
fireClusterNodeOffline
protected void fireClusterNodeOffline(ClusterInstance clusterInstance)
fireEvent
public void fireEvent(MulticastEvent multicastEvent)
throws EventMessageException
- Throws:
EventMessageException
deliverEvent
public void deliverEvent(MulticastEvent multicastEvent)
- Specified by:
deliverEvent in interface MulticastEventHandler
finalize
public void finalize()
- Overrides:
finalize in class Object
logError
public void logError(String message)
logError
public void logError(Throwable throwable)
Copyright © 2011. All Rights Reserved.