Package org.elasticsearch.indices.flush
Class ShardsSyncedFlushResult
- java.lang.Object
-
- org.elasticsearch.indices.flush.ShardsSyncedFlushResult
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Constructor Summary
Constructors Constructor Description ShardsSyncedFlushResult(StreamInput in)ShardsSyncedFlushResult(ShardId shardId, int totalShards, String failureReason)failure constructorShardsSyncedFlushResult(ShardId shardId, String syncId, int totalShards, Map<ShardRouting,SyncedFlushService.ShardSyncedFlushResponse> shardResponses)success constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanfailed()Map<ShardRouting,SyncedFlushService.ShardSyncedFlushResponse>failedShards()StringfailureReason()ShardIdgetShardId()ShardIdshardId()Map<ShardRouting,SyncedFlushService.ShardSyncedFlushResponse>shardResponses()intsuccessfulShards()StringsyncId()inttotalShards()voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
-
-
Constructor Detail
-
ShardsSyncedFlushResult
public ShardsSyncedFlushResult(StreamInput in) throws IOException
- Throws:
IOException
-
ShardsSyncedFlushResult
public ShardsSyncedFlushResult(ShardId shardId, int totalShards, String failureReason)
failure constructor
-
ShardsSyncedFlushResult
public ShardsSyncedFlushResult(ShardId shardId, String syncId, int totalShards, Map<ShardRouting,SyncedFlushService.ShardSyncedFlushResponse> shardResponses)
success constructor
-
-
Method Detail
-
getShardId
public ShardId 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
public String failureReason()
- Returns:
- the reason for the failure if synced flush failed before step three of synced flush
-
syncId
public String 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
public Map<ShardRouting,SyncedFlushService.ShardSyncedFlushResponse> failedShards()
- Returns:
- an array of shard failures
-
shardResponses
public Map<ShardRouting,SyncedFlushService.ShardSyncedFlushResponse> 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
public ShardId shardId()
-
writeTo
public void writeTo(StreamOutput out) throws IOException
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
-