public class ClusterChangedEvent
extends java.lang.Object
Constructor and Description |
---|
ClusterChangedEvent(java.lang.String source,
ClusterState state,
ClusterState previousState) |
Modifier and Type | Method and Description |
---|---|
boolean |
blocksChanged()
Returns
true iff the cluster level blocks have changed between cluster states. |
boolean |
indexMetaDataChanged(IndexMetaData current)
Returns
true iff the IndexMetaData for a given index
has changed between the previous cluster state and the new cluster state. |
boolean |
indexRoutingTableChanged(java.lang.String index)
Returns
true iff the routing table has changed for the given index. |
java.util.List<java.lang.String> |
indicesCreated()
Returns the indices created in this event
|
java.util.List<Index> |
indicesDeleted()
Returns the indices deleted in this event
|
boolean |
localNodeMaster()
Returns
true iff the local node is the mater node of the cluster. |
boolean |
metaDataChanged()
Returns
true iff the metadata for the cluster has changed between
the previous cluster state and the new cluster state. |
boolean |
nodesAdded()
Returns
true iff nodes have been added from the cluster since the last cluster state. |
boolean |
nodesChanged()
Returns
true iff nodes have been changed (added or removed) from the cluster since the last cluster state. |
DiscoveryNodes.Delta |
nodesDelta()
Returns the
DiscoveryNodes.Delta between
the previous cluster state and the new cluster state. |
boolean |
nodesRemoved()
Returns
true iff nodes have been removed from the cluster since the last cluster state. |
ClusterState |
previousState()
The previous cluster state for this change event.
|
boolean |
routingTableChanged()
Returns
true iff the routing tables (for all indices) have
changed between the previous cluster state and the current cluster state. |
java.lang.String |
source()
The source that caused this cluster event to be raised.
|
ClusterState |
state()
The new cluster state that caused this change event.
|
public ClusterChangedEvent(java.lang.String source, ClusterState state, ClusterState previousState)
public java.lang.String source()
public ClusterState state()
public ClusterState previousState()
public boolean routingTableChanged()
true
iff the routing tables (for all indices) have
changed between the previous cluster state and the current cluster state.
Note that this is an object reference equality test, not an equals test.public boolean indexRoutingTableChanged(java.lang.String index)
true
iff the routing table has changed for the given index.
Note that this is an object reference equality test, not an equals test.public java.util.List<java.lang.String> indicesCreated()
public java.util.List<Index> indicesDeleted()
public boolean metaDataChanged()
true
iff the metadata for the cluster has changed between
the previous cluster state and the new cluster state. Note that this is an object
reference equality test, not an equals test.public boolean indexMetaDataChanged(IndexMetaData current)
true
iff the IndexMetaData
for a given index
has changed between the previous cluster state and the new cluster state.
Note that this is an object reference equality test, not an equals test.public boolean blocksChanged()
true
iff the cluster level blocks have changed between cluster states.
Note that this is an object reference equality test, not an equals test.public boolean localNodeMaster()
true
iff the local node is the mater node of the cluster.public DiscoveryNodes.Delta nodesDelta()
DiscoveryNodes.Delta
between
the previous cluster state and the new cluster state.public boolean nodesRemoved()
true
iff nodes have been removed from the cluster since the last cluster state.public boolean nodesAdded()
true
iff nodes have been added from the cluster since the last cluster state.public boolean nodesChanged()
true
iff nodes have been changed (added or removed) from the cluster since the last cluster state.