Module org.elasticsearch.server
Class ShutdownShardMigrationStatus
java.lang.Object
org.elasticsearch.cluster.metadata.ShutdownShardMigrationStatus
- All Implemented Interfaces:
Writeable
,ChunkedToXContent
,ChunkedToXContentObject
public class ShutdownShardMigrationStatus
extends Object
implements Writeable, ChunkedToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
EMPTY
-
Constructor Summary
ConstructorDescriptionShutdownShardMigrationStatus
(SingleNodeShutdownMetadata.Status status, long startedShards, long relocatingShards, long initializingShards) ShutdownShardMigrationStatus
(SingleNodeShutdownMetadata.Status status, long startedShards, long relocatingShards, long initializingShards, String explanation) ShutdownShardMigrationStatus
(SingleNodeShutdownMetadata.Status status, long shardsRemaining, String explanation, ShardAllocationDecision allocationDecision) -
Method Summary
Modifier and TypeMethodDescriptionboolean
long
int
hashCode()
toString()
Iterator<? extends ToXContent>
toXContentChunked
(ToXContent.Params params) Create an iterator ofToXContent
chunks for a REST response.void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
toXContentChunkedV7
Methods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContentObject
isFragment
-
Field Details
-
NODE_ALLOCATION_DECISION_KEY
- See Also:
-
-
Constructor Details
-
ShutdownShardMigrationStatus
public ShutdownShardMigrationStatus(SingleNodeShutdownMetadata.Status status, long shardsRemaining, @Nullable String explanation, @Nullable ShardAllocationDecision allocationDecision) -
ShutdownShardMigrationStatus
public ShutdownShardMigrationStatus(SingleNodeShutdownMetadata.Status status, long startedShards, long relocatingShards, long initializingShards) -
ShutdownShardMigrationStatus
public ShutdownShardMigrationStatus(SingleNodeShutdownMetadata.Status status, long startedShards, long relocatingShards, long initializingShards, @Nullable String explanation) -
ShutdownShardMigrationStatus
- Throws:
IOException
-
-
Method Details
-
getShardsRemaining
public long getShardsRemaining() -
getExplanation
-
getStatus
-
toXContentChunked
Description copied from interface:ChunkedToXContent
Create an iterator ofToXContent
chunks for a REST response. Each chunk is serialized with the sameXContentBuilder
andToXContent.Params
, which is also the same as theToXContent.Params
passed as theparams
argument. For best results, all chunks should beO(1)
size. The last chunk in the iterator must always yield at least one byte of output. See alsoChunkedToXContentHelper
for some handy utilities.Note that chunked response bodies cannot send deprecation warning headers once transmission has started, so implementations must check for deprecated feature use before returning.
- Specified by:
toXContentChunked
in interfaceChunkedToXContent
- Returns:
- iterator over chunks of
ToXContent
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-