Class ShardsSyncedFlushResult

java.lang.Object
org.elasticsearch.indices.flush.ShardsSyncedFlushResult
All Implemented Interfaces:
Writeable

public class ShardsSyncedFlushResult
extends java.lang.Object
implements Writeable
Result for all copies of a shard
  • Constructor Details

    • ShardsSyncedFlushResult

      public ShardsSyncedFlushResult​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
    • ShardsSyncedFlushResult

      public ShardsSyncedFlushResult​(ShardId shardId, int totalShards, java.lang.String failureReason)
      failure constructor
    • ShardsSyncedFlushResult

      public ShardsSyncedFlushResult​(ShardId shardId, java.lang.String syncId, int totalShards, java.util.Map<ShardRouting,​SyncedFlushService.ShardSyncedFlushResponse> shardResponses)
      success constructor
  • Method Details

    • 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 java.lang.String failureReason()
      Returns:
      the reason for the failure if synced flush failed before step three of synced flush
    • syncId

      public java.lang.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 java.util.Map<ShardRouting,​SyncedFlushService.ShardSyncedFlushResponse> failedShards()
      Returns:
      an array of shard failures
    • shardResponses

      public java.util.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 java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      java.io.IOException