ehcache

net.sf.ehcache.cluster
Interface CacheCluster

All Known Implementing Classes:
NoopCacheCluster

public interface CacheCluster

Allows you to explore the Terracotta cluster nodes and register for events about the cluster.

Since:
2.0
Author:
Geert Bevin, Abhishek Sanoujam

Method Summary
 boolean addTopologyListener(ClusterTopologyListener listener)
          Add a listener for cluster events
 java.util.Collection<ClusterNode> getNodes()
          Get all the nodes in the cluster
 ClusterScheme getScheme()
          Get scheme name for this cluster info.
 boolean isClusterOnline()
          Find out if the current node is connected to the cluster or not
 boolean removeTopologyListener(ClusterTopologyListener listener)
          Remove a listener for cluster events
 

Method Detail

getScheme

ClusterScheme getScheme()
Get scheme name for this cluster info.

Returns:
a scheme name for the cluster information. Currently TERRACOTTA is the only scheme supported.

getNodes

java.util.Collection<ClusterNode> getNodes()
Get all the nodes in the cluster

Returns:
information on all the nodes in the cluster, including ID, hostname, and IP address.

isClusterOnline

boolean isClusterOnline()
Find out if the current node is connected to the cluster or not

Returns:
true if cluster is online otherwise false

addTopologyListener

boolean addTopologyListener(ClusterTopologyListener listener)
Add a listener for cluster events

Parameters:
listener - Listener
Returns:
True if already listening

removeTopologyListener

boolean removeTopologyListener(ClusterTopologyListener listener)
Remove a listener for cluster events

Parameters:
listener - Listener
Returns:
True if not listening

ehcache

true