java.lang.Object
org.elasticsearch.cluster.AbstractNamedDiffable<ClusterState.Custom>
org.elasticsearch.health.metadata.HealthMetadata
- All Implemented Interfaces:
ClusterState.Custom,Diffable<ClusterState.Custom>,NamedDiffable<ClusterState.Custom>,NamedWriteable,VersionedNamedWriteable,Writeable,ChunkedToXContent
public final class HealthMetadata
extends AbstractNamedDiffable<ClusterState.Custom>
implements ClusterState.Custom
A cluster state entry that contains a list of all the thresholds used to determine if a node is healthy.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final recordContains the thresholds necessary to determine the health of the disk space of a node.static final recordContains the thresholds needed to determine the health of a cluster when it comes to the amount of room available to create new shards.Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionHealthMetadata(HealthMetadata.Disk diskMetadata, HealthMetadata.ShardLimits shardLimitsMetadata) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic HealthMetadatagetFromClusterState(ClusterState clusterState) The minimal version of the recipient this object can be sent to.Returns the name of the writeable objectinthashCode()static HealthMetadata.BuildernewBuilder(HealthMetadata healthMetadata) static NamedDiff<ClusterState.Custom> toString()Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params ignored) Serialize thisClusterState.Customfor diagnostic purposes, exposed by thevoidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.cluster.AbstractNamedDiffable
diff, get, readDiffFromMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
isFragment, toXContentChunked, toXContentChunkedV8Methods inherited from interface org.elasticsearch.cluster.ClusterState.Custom
isPrivateMethods inherited from interface org.elasticsearch.common.io.stream.VersionedNamedWriteable
supportsVersion
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
HealthMetadata
public HealthMetadata(HealthMetadata.Disk diskMetadata, HealthMetadata.ShardLimits shardLimitsMetadata) -
HealthMetadata
- Throws:
IOException
-
-
Method Details
-
getWriteableName
Description copied from interface:VersionedNamedWriteableReturns the name of the writeable object- Specified by:
getWriteableNamein interfaceNamedWriteable- Specified by:
getWriteableNamein interfaceVersionedNamedWriteable
-
getMinimalSupportedVersion
Description copied from interface:VersionedNamedWriteableThe minimal version of the recipient this object can be sent to. SeeVersionedNamedWriteable.supportsVersion(TransportVersion)for the default serialization check.- Specified by:
getMinimalSupportedVersionin interfaceVersionedNamedWriteable
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
readDiffFrom
- Throws:
IOException
-
toXContentChunked
Description copied from interface:ClusterState.CustomSerialize thisClusterState.Customfor diagnostic purposes, exposed by theGET _cluster/state
API etc. The XContent representation does not need to be 100% faithful since we never reconstruct a cluster state from its XContent representation, but the more faithful it is the more useful it is for diagnostics.- Specified by:
toXContentChunkedin interfaceChunkedToXContent- Specified by:
toXContentChunkedin interfaceClusterState.Custom- Returns:
- iterator over chunks of
ToXContent
-
getFromClusterState
-
getDiskMetadata
-
getShardLimitsMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-
newBuilder
-