Class SingleNodeShutdownMetadata
java.lang.Object
org.elasticsearch.cluster.AbstractDiffable<SingleNodeShutdownMetadata>
org.elasticsearch.cluster.metadata.SingleNodeShutdownMetadata
- All Implemented Interfaces:
Diffable<SingleNodeShutdownMetadata>
,Writeable
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentObject
public class SingleNodeShutdownMetadata
extends AbstractDiffable<SingleNodeShutdownMetadata>
implements org.elasticsearch.xcontent.ToXContentObject, Diffable<SingleNodeShutdownMetadata>
Contains data about a single node's shutdown readiness.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
Describes the status of a component of shutdown.static enum
Describes the type of node shutdown - permanent (REMOVE) or temporary (RESTART).Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.core.TimeValue
static final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ConstructingObjectParser<SingleNodeShutdownMetadata,
Void> static final org.elasticsearch.xcontent.ParseField
static final Version
static final org.elasticsearch.xcontent.ParseField
static final String
static final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ParseField
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder
(SingleNodeShutdownMetadata original) boolean
org.elasticsearch.core.TimeValue
boolean
long
getType()
int
hashCode()
static SingleNodeShutdownMetadata
parse
(org.elasticsearch.xcontent.XContentParser parser) toString()
org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.cluster.AbstractDiffable
diff, readDiffFrom
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
REPLACE_SHUTDOWN_TYPE_ADDED_VERSION
-
NODE_ID_FIELD
public static final org.elasticsearch.xcontent.ParseField NODE_ID_FIELD -
TYPE_FIELD
public static final org.elasticsearch.xcontent.ParseField TYPE_FIELD -
REASON_FIELD
public static final org.elasticsearch.xcontent.ParseField REASON_FIELD -
STARTED_AT_READABLE_FIELD
- See Also:
-
STARTED_AT_MILLIS_FIELD
public static final org.elasticsearch.xcontent.ParseField STARTED_AT_MILLIS_FIELD -
ALLOCATION_DELAY_FIELD
public static final org.elasticsearch.xcontent.ParseField ALLOCATION_DELAY_FIELD -
NODE_SEEN_FIELD
public static final org.elasticsearch.xcontent.ParseField NODE_SEEN_FIELD -
TARGET_NODE_NAME_FIELD
public static final org.elasticsearch.xcontent.ParseField TARGET_NODE_NAME_FIELD -
PARSER
public static final org.elasticsearch.xcontent.ConstructingObjectParser<SingleNodeShutdownMetadata,Void> PARSER -
DEFAULT_RESTART_SHARD_ALLOCATION_DELAY
public static final org.elasticsearch.core.TimeValue DEFAULT_RESTART_SHARD_ALLOCATION_DELAY
-
-
Constructor Details
-
SingleNodeShutdownMetadata
- Throws:
IOException
-
-
Method Details
-
parse
-
getNodeId
- Returns:
- The ID of the node this
SingleNodeShutdownMetadata
concerns.
-
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
@Nullable public org.elasticsearch.core.TimeValue 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
null
for non-restart shutdowns.
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-
builder
-
builder
-