Package org.elasticsearch.indices.flush
Class ShardsSyncedFlushResult
java.lang.Object
org.elasticsearch.indices.flush.ShardsSyncedFlushResult
- All Implemented Interfaces:
Writeable
Result for all copies of a shard
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Constructor Summary
ConstructorDescriptionShardsSyncedFlushResult
(ShardId shardId, int totalShards, String failureReason) failure constructorShardsSyncedFlushResult
(ShardId shardId, String syncId, int totalShards, Map<ShardRouting, SyncedFlushService.ShardSyncedFlushResponse> shardResponses) success constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
failed()
shardId()
int
syncId()
int
void
writeTo
(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
ShardsSyncedFlushResult
- Throws:
IOException
-
ShardsSyncedFlushResult
failure constructor -
ShardsSyncedFlushResult
public ShardsSyncedFlushResult(ShardId shardId, String syncId, int totalShards, Map<ShardRouting, SyncedFlushService.ShardSyncedFlushResponse> shardResponses) success constructor
-
-
Method Details
-
getShardId
-
failed
public boolean failed()- Returns:
- true if the operation failed before reaching step three of synced flush.
failureReason()
can be used for more details
-
failureReason
- Returns:
- the reason for the failure if synced flush failed before step three of synced flush
-
syncId
-
totalShards
public int totalShards()- Returns:
- total number of shards for which a sync attempt was made
-
successfulShards
public int successfulShards()- Returns:
- total number of successful shards
-
failedShards
- Returns:
- an array of shard failures
-
shardResponses
- Returns:
- Individual responses for each shard copy with a detailed failure message if the copy failed to perform the synced flush. Empty if synced flush failed before step three.
-
shardId
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-