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

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 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.

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