|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.cluster.NoopCacheCluster
public class NoopCacheCluster
This is a dummy implementation of the CacheCluster (Null Object Pattern). It ignores all listeners and reports no nodes.
Field Summary | |
---|---|
static CacheCluster |
INSTANCE
A singleton instance you can use rather than constructing your own. |
Constructor Summary | |
---|---|
NoopCacheCluster()
|
Method Summary | |
---|---|
boolean |
addTopologyListener(ClusterTopologyListener listener)
Add a listener for cluster events |
ClusterNode |
getCurrentNode()
Retrieves the ClusterNode instance that corresponds to the current node. |
Collection<ClusterNode> |
getNodes()
Get all the nodes in the cluster |
ClusterScheme |
getScheme()
Always returns the ClusterScheme.NONE |
List<ClusterTopologyListener> |
getTopologyListeners()
Get all the topology listeners |
boolean |
isClusterOnline()
Find out if the current node is connected to the cluster or not |
void |
removeAllListeners()
Removes all listeners for cluster events |
boolean |
removeTopologyListener(ClusterTopologyListener listener)
Remove a listener for cluster events |
ClusterNode |
waitUntilNodeJoinsCluster()
Waits until the current node has successfully joined the cluster. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final CacheCluster INSTANCE
Constructor Detail |
---|
public NoopCacheCluster()
Method Detail |
---|
public Collection<ClusterNode> getNodes()
getNodes
in interface CacheCluster
public ClusterScheme getScheme()
getScheme
in interface CacheCluster
ClusterScheme.NONE
public boolean addTopologyListener(ClusterTopologyListener listener)
addTopologyListener
in interface CacheCluster
listener
- Listener
public boolean removeTopologyListener(ClusterTopologyListener listener)
removeTopologyListener
in interface CacheCluster
listener
- Listener
public boolean isClusterOnline()
isClusterOnline
in interface CacheCluster
public ClusterNode getCurrentNode()
ClusterNode
instance that corresponds to the current node.
getCurrentNode
in interface CacheCluster
ClusterNode
instance that corresponds to the current nodepublic ClusterNode waitUntilNodeJoinsCluster()
waitUntilNodeJoinsCluster
in interface CacheCluster
ClusterNode
instance that corresponds to the current nodepublic List<ClusterTopologyListener> getTopologyListeners()
getTopologyListeners
in interface CacheCluster
public void removeAllListeners()
CacheCluster
removeAllListeners
in interface CacheCluster
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |