T
- type of message this listener receivespublic interface ClusterListener<T>
Modifier and Type | Method and Description |
---|---|
byte[] |
getState()
Get state of this cluster node to send it to other nodes.
|
void |
receive(T message)
Receive a message from other cluster nodes.
|
void |
setState(byte[] state)
Set state of this cluster node receiving it from other active node.
|
void receive(T message)
message
- message instancebyte[] getState()
This method is invoked by clustering implementation when a new node joins the cluster and wants to receive the state from this active node.
void setState(byte[] state)
This method is invoked by clustering implementation once when this node joins the cluster.
state
- byte array containing the state