ehcache

net.sf.ehcache
Class CacheClusterStateStatisticsListener

java.lang.Object
  extended by net.sf.ehcache.CacheClusterStateStatisticsListener
All Implemented Interfaces:
ClusterTopologyListener

public class CacheClusterStateStatisticsListener
extends Object
implements ClusterTopologyListener

A listener to capture statistics relating to cluster events regarding this node. This should really be a single listener, at the cache manager level, with CacheManager statistics. But we don't have that concept at the moment. Sad face.

Author:
cschanck

Method Summary
 void clusterOffline(ClusterNode node)
          This node has lost contact (possibly temporarily) with the cluster and cannot execute clustered operations
 void clusterOnline(ClusterNode node)
          This node has established contact with the cluster and can execute clustered operations.
 void clusterRejoined(ClusterNode oldNode, ClusterNode newNode)
          This node lost contact and rejoined the cluster again.
 long getMostRecentRejoinTimeStampMS()
          Gets the last rejoin time stamp nanos.
 void nodeJoined(ClusterNode node)
          A node has joined the cluster
 void nodeLeft(ClusterNode node)
          A node has left the cluster
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

nodeLeft

public void nodeLeft(ClusterNode node)
Description copied from interface: ClusterTopologyListener
A node has left the cluster

Specified by:
nodeLeft in interface ClusterTopologyListener
Parameters:
node - The departing node

nodeJoined

public void nodeJoined(ClusterNode node)
Description copied from interface: ClusterTopologyListener
A node has joined the cluster

Specified by:
nodeJoined in interface ClusterTopologyListener
Parameters:
node - The joining node

clusterRejoined

public void clusterRejoined(ClusterNode oldNode,
                            ClusterNode newNode)
Description copied from interface: ClusterTopologyListener
This node lost contact and rejoined the cluster again.

This event is only fired in the node which rejoined and not to all the connected nodes

Specified by:
clusterRejoined in interface ClusterTopologyListener
Parameters:
oldNode - The old node which got disconnected
newNode - The new node after rejoin

clusterOnline

public void clusterOnline(ClusterNode node)
Description copied from interface: ClusterTopologyListener
This node has established contact with the cluster and can execute clustered operations.

Specified by:
clusterOnline in interface ClusterTopologyListener
Parameters:
node - The current node

clusterOffline

public void clusterOffline(ClusterNode node)
Description copied from interface: ClusterTopologyListener
This node has lost contact (possibly temporarily) with the cluster and cannot execute clustered operations

Specified by:
clusterOffline in interface ClusterTopologyListener
Parameters:
node - The current node

getMostRecentRejoinTimeStampMS

public long getMostRecentRejoinTimeStampMS()
Gets the last rejoin time stamp nanos.

Returns:
the last rejoin time stamp nanos

ehcache

Copyright 2001-2014, Terracotta, Inc.