jgroup.core
Interface StateListener


public interface StateListener

In order to be notified of state updates, the server replicas must implement this interface. Servers implementing this interface should be considered semi-actively replicated, were one of the servers is elected as the group leader. Note that it is required that the state object returned by the getState() method does implement/override the hashCode() method, since that is used to determine if the leader state should be sent to the followers.

Since:
3.0
Author:
Hein Meling

Method Summary
 java.lang.Object getState()
          Method getState is invoked by the group leader, and should return its current state.
 void putState(java.lang.Object state)
          Method putState is invoked on followers to inform them about the new state of the group leader.
 

Method Detail

getState

java.lang.Object getState()
Method getState is invoked by the group leader, and should return its current state.

Returns:
The state object

putState

void putState(java.lang.Object state)
Method putState is invoked on followers to inform them about the new state of the group leader.

Parameters:
state - The state object


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.