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 longFAKE_PING_IDAn 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 ClusterNameclusterName()the name of the cluster this node belongs tolonggetClusterStateVersion()the current cluster state version of that node (ElectMasterService.MasterCandidate.UNRECOVERED_CLUSTER_VERSIONfor not recovered)longid()an always increasing unique identifier for this ping response.DiscoveryNodemaster()the current master of the nodeDiscoveryNodenode()the node which this ping describesjava.lang.StringtoString()voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
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_VERSIONfor 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_VERSIONfor not recovered)
-
PingResponse
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite 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_VERSIONfor not recovered) -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-