|
Openfire 3.4.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClusterEventListener
Listener for cluster events. Use ClusterManager.addListener(ClusterEventListener)
to add new listeners.
Method Summary | |
---|---|
void |
joinedCluster()
Notification event indicating that this JVM is now part of a cluster. |
void |
joinedCluster(byte[] nodeID)
Notification event indicating that another JVM is now part of a cluster. |
void |
leftCluster()
Notification event indicating that this JVM is no longer part of the cluster. |
void |
leftCluster(byte[] nodeID)
Notification event indicating that another JVM is no longer part of the cluster. |
void |
markedAsSeniorClusterMember()
Notification event indicating that this JVM is now the senior cluster member. |
Method Detail |
---|
void joinedCluster()
XMPPServer.getNodeID()
holds the new nodeID value.
When joining the cluster as the senior cluster member the markedAsSeniorClusterMember()
event will be sent right after this event.
At this point the CacheFactory holds clustered caches. That means that modifications to the caches will be reflected in the cluster. The clustered caches were just obtained from the cluster and no local cached data was automatically moved.
void joinedCluster(byte[] nodeID)
At this point the CacheFactory of the new node holds clustered caches. That means that modifications to the caches of this JVM will be reflected in the cluster and in particular in the new node.
nodeID
- ID of the node that joined the cluster.void leftCluster()
Moreover, if we were in a "split brain" scenario (ie. separated cluster islands) and the island were this JVM belonged was marked as "old" then all nodes of that island will get the left cluster event and joined cluster events. That means that caches will be reset and thus will need to be repopulated again with fresh data from this JVM. This also includes the case where this JVM was the senior cluster member and when the islands met again then this JVM stopped being the senior member.
At this point the CacheFactory holds local caches. That means that modifications to the caches will only affect this JVM.
void leftCluster(byte[] nodeID)
Moreover, if we were in a "split brain" scenario (ie. separated cluster islands) and the island were the other JVM belonged was marked as "old" then all nodes of that island will get the left cluster event and joined cluster events. That means that caches will be reset and thus will need to be repopulated again with fresh data from this JVM. This also includes the case where the other JVM was the senior cluster member and when the islands met again then the other JVM stopped being the senior member.
At this point the CacheFactory of the leaving node holds local caches. That means that modifications to the caches of this JVM will not affect the leaving node but other cluster members.
nodeID
- ID of the node that is left the cluster.void markedAsSeniorClusterMember()
Moreover, in the case of a "split brain" scenario (ie. separated cluster islands) each
island will have its own senior cluster member. However, when the islands meet again there
could only be one senior cluster member so one of the senior cluster members will stop playing
that role. When that happens the JVM no longer playing that role will receive the
leftCluster()
and joinedCluster()
events.
|
Openfire 3.4.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |