Module org.elasticsearch.server
Class SingleNodeShutdownMetadata
java.lang.Object
org.elasticsearch.cluster.metadata.SingleNodeShutdownMetadata
- All Implemented Interfaces:
Diffable<SingleNodeShutdownMetadata>,SimpleDiffable<SingleNodeShutdownMetadata>,Writeable,ToXContent,ToXContentObject
public class SingleNodeShutdownMetadata
extends Object
implements SimpleDiffable<SingleNodeShutdownMetadata>, ToXContentObject
Contains data about a single node's shutdown readiness.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumDescribes the status of a component of shutdown.static enumDescribes the type of node shutdown - permanent (REMOVE) or temporary (RESTART).Nested classes/interfaces inherited from interface org.elasticsearch.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParseFieldstatic final TimeValuestatic final TransportVersionstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ConstructingObjectParser<SingleNodeShutdownMetadata, Void> static final ParseFieldstatic final TransportVersionstatic final ParseFieldstatic final Stringstatic final ParseFieldstatic final ParseFieldFields inherited from interface org.elasticsearch.cluster.SimpleDiffable
EMPTYFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder(SingleNodeShutdownMetadata original) booleanbooleanlonggetType()inthashCode()static SingleNodeShutdownMetadataparse(XContentParser parser) toString()toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diffMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
SIGTERM_ADDED_VERSION
-
GRACE_PERIOD_ADDED_VERSION
-
NODE_ID_FIELD
-
NODE_EPHEMERAL_ID_FIELD
-
TYPE_FIELD
-
REASON_FIELD
-
STARTED_AT_READABLE_FIELD
- See Also:
-
STARTED_AT_MILLIS_FIELD
-
ALLOCATION_DELAY_FIELD
-
NODE_SEEN_FIELD
-
TARGET_NODE_NAME_FIELD
-
GRACE_PERIOD_FIELD
-
PARSER
-
DEFAULT_RESTART_SHARD_ALLOCATION_DELAY
-
-
Constructor Details
-
SingleNodeShutdownMetadata
- Throws:
IOException
-
-
Method Details
-
parse
-
getNodeId
- Returns:
- The ID of the node this
SingleNodeShutdownMetadataconcerns.
-
getNodeEphemeralId
- Returns:
- The ephemeral ID of the node this
SingleNodeShutdownMetadataconcerns, ornullif the ephemeral id is unknown.
-
getType
- Returns:
- The type of shutdown this is (shutdown vs. permanent).
-
getReason
- Returns:
- The user-supplied reason this node is shutting down.
-
getStartedAtMillis
public long getStartedAtMillis()- Returns:
- The timestamp that this shutdown procedure was started.
-
getNodeSeen
public boolean getNodeSeen()- Returns:
- A boolean indicated whether this node has been seen in the cluster since the shutdown was registered.
-
getTargetNodeName
- Returns:
- The name of the node to be used as a replacement for this node, or null.
-
getAllocationDelay
- Returns:
- The amount of time shard reallocation should be delayed for shards on this node, so that they will not be automatically
reassigned while the node is restarting. Will be
nullfor non-restart shutdowns.
-
getGracePeriod
- Returns:
- the timeout for a graceful shutdown for a SIGTERM type.
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-
builder
-
builder
-