Class SingleNodeShutdownMetadata

java.lang.Object
org.elasticsearch.cluster.AbstractDiffable<SingleNodeShutdownMetadata>
org.elasticsearch.cluster.metadata.SingleNodeShutdownMetadata
All Implemented Interfaces:
Diffable<SingleNodeShutdownMetadata>, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

public class SingleNodeShutdownMetadata extends AbstractDiffable<SingleNodeShutdownMetadata> implements org.elasticsearch.common.xcontent.ToXContentObject, Diffable<SingleNodeShutdownMetadata>
Contains data about a single node's shutdown readiness.
  • Field Details

    • NODE_ID_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField NODE_ID_FIELD
    • TYPE_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField TYPE_FIELD
    • REASON_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField REASON_FIELD
    • STARTED_AT_READABLE_FIELD

      public static final String STARTED_AT_READABLE_FIELD
      See Also:
      Constant Field Values
    • STARTED_AT_MILLIS_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField STARTED_AT_MILLIS_FIELD
    • ALLOCATION_DELAY_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField ALLOCATION_DELAY_FIELD
    • NODE_SEEN_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField NODE_SEEN_FIELD
    • PARSER

      public static final org.elasticsearch.common.xcontent.ConstructingObjectParser<SingleNodeShutdownMetadata,​Void> PARSER
    • DEFAULT_RESTART_SHARD_ALLOCATION_DELAY

      public static final org.elasticsearch.core.TimeValue DEFAULT_RESTART_SHARD_ALLOCATION_DELAY
  • Constructor Details

  • Method Details

    • parse

      public static SingleNodeShutdownMetadata parse(org.elasticsearch.common.xcontent.XContentParser parser)
    • getNodeId

      public String getNodeId()
      Returns:
      The ID of the node this SingleNodeShutdownMetadata concerns.
    • getType

      Returns:
      The type of shutdown this is (shutdown vs. permanent).
    • getReason

      public String 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.
    • 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

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • builder

      public static SingleNodeShutdownMetadata.Builder builder()
    • builder