Package org.elasticsearch.discovery.zen
Class ZenPing.PingResponse
java.lang.Object
org.elasticsearch.discovery.zen.ZenPing.PingResponse
- All Implemented Interfaces:
Writeable
- Enclosing interface:
- ZenPing
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic longAn ID of a ping response that was generated on behalf of another node. -
Constructor Summary
ConstructorsConstructorDescriptionPingResponse(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 TypeMethodDescriptionthe name of the cluster this node belongs tolongthe current cluster state version of that node (ElectMasterService.MasterCandidate.UNRECOVERED_CLUSTER_VERSIONfor not recovered)longid()an always increasing unique identifier for this ping response.master()the current master of the nodenode()the node which this ping describestoString()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.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
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
-