org.terracotta.toolkit.cluster
Interface ClusterListener


public interface ClusterListener

A listener interface that can be implemented to be notified about cluster events.

Listeners can be registered through the addClusterListener method and removed through the removeClusterListener method of a ClusterInfo instance.

The ordering and the timing of the events isn't guaranteed across the cluster. It is however guaranteed that the events can only appear in the following order on each individual node:

  1. node joined
  2. operations enabled
  3. operations disabled
  4. node left

The node joined and node left events are sent to all the nodes in the cluster and happen once for the lifetime of a node.

The operations enabled and operations disabled events are repeatable and indicate temporary situations that may resolve themselves automatically over time. Only the current node will receive events concerning its own cluster operations. Nodes in the cluster don't get cluster operation events about other nodes.


Method Summary
 void onClusterEvent(ClusterEvent event)
          This method is called whenever a ClusterEvent occurs.
 

Method Detail

onClusterEvent

void onClusterEvent(ClusterEvent event)
This method is called whenever a ClusterEvent occurs.

Parameters:
event - details about the event


Copyright © 2014 Terracotta, Inc.. All Rights Reserved.