Package org.elasticsearch.discovery.zen
Class ZenPing.PingResponse
java.lang.Object
org.elasticsearch.discovery.zen.ZenPing.PingResponse
- All Implemented Interfaces:
Writeable
- Enclosing interface:
- ZenPing
public static class ZenPing.PingResponse extends java.lang.Object implements Writeable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields Modifier and Type Field Description static long
FAKE_PING_ID
An ID of a ping response that was generated on behalf of another node. -
Constructor Summary
Constructors Constructor Description PingResponse(long id, DiscoveryNode node, DiscoveryNode master, ClusterName clusterName, long clusterStateVersion)
PingResponse(DiscoveryNode node, DiscoveryNode master, ClusterName clusterName, long clusterStateVersion)
PingResponse(DiscoveryNode node, DiscoveryNode master, ClusterState state)
-
Method Summary
Modifier and Type Method Description ClusterName
clusterName()
the name of the cluster this node belongs tolong
getClusterStateVersion()
the current cluster state version of that node (ElectMasterService.MasterCandidate.UNRECOVERED_CLUSTER_VERSION
for not recovered)long
id()
an always increasing unique identifier for this ping response.DiscoveryNode
master()
the current master of the nodeDiscoveryNode
node()
the node which this ping describesjava.lang.String
toString()
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
FAKE_PING_ID
public static long FAKE_PING_IDAn ID of a ping response that was generated on behalf of another node. Needs to be less than all other ping IDs so that fake ping responses don't override real ones.
-
-
Constructor Details
-
PingResponse
public PingResponse(DiscoveryNode node, DiscoveryNode master, ClusterName clusterName, long clusterStateVersion)- Parameters:
node
- the node which this ping describesmaster
- the current master of the nodeclusterName
- the cluster name of the nodeclusterStateVersion
- the current cluster state version of that node (ElectMasterService.MasterCandidate.UNRECOVERED_CLUSTER_VERSION
for not recovered)
-
PingResponse
public PingResponse(long id, DiscoveryNode node, DiscoveryNode master, ClusterName clusterName, long clusterStateVersion)- Parameters:
id
- the ping's IDnode
- the node which this ping describesmaster
- the current master of the nodeclusterName
- the cluster name of the nodeclusterStateVersion
- the current cluster state version of that node (ElectMasterService.MasterCandidate.UNRECOVERED_CLUSTER_VERSION
for not recovered)
-
PingResponse
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput. -
id
public long id()an always increasing unique identifier for this ping response. lower values means older pings. -
clusterName
the name of the cluster this node belongs to -
node
the node which this ping describes -
master
the current master of the node -
getClusterStateVersion
public long getClusterStateVersion()the current cluster state version of that node (ElectMasterService.MasterCandidate.UNRECOVERED_CLUSTER_VERSION
for not recovered) -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-