|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClusterInfo
The ClusterInfo
interface provides access to cluster events and metadata.
Note that only client nodes are taken into account for the cluster events and meta data, information about server nodes is not available.
See ClusterListener
for more information about the events themselves.
Method Summary | |
---|---|
void |
addClusterListener(ClusterListener listener)
Adds a cluster events listener. |
boolean |
areOperationsEnabled()
Indicates whether any operations involving transfer of network data are enabled on the current node. |
ClusterNode |
getCurrentNode()
Retrieves the ClusterNode instance that corresponds to the current node. |
Set<ClusterNode> |
getNodes()
Returns a collection that contains a snapshot of the nodes that are part of the cluster at the time of the method call. |
void |
removeClusterListener(ClusterListener listener)
Removes a cluster events listener. |
Method Detail |
---|
void addClusterListener(ClusterListener listener)
If the cluster events listener instance has already been registered before, this method will not register it again.
If the node has already joined the cluster, and additionally if operations have already been enabled on this node, then the corresponding events will be fired immediately
listener
- the cluster listener instance that will be registeredvoid removeClusterListener(ClusterListener listener)
If the cluster events listener instance was not registered before, this method will have no effect.
listener
- the cluster listener instance that will be unregisteredClusterNode getCurrentNode()
ClusterNode
instance that corresponds to the current node.
ClusterNode
instance that corresponds to the current node, will return null cluster not
initializedboolean areOperationsEnabled()
true
if network operations are enabled on the current node; false
otherwiseSet<ClusterNode> getNodes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |