Class SegmentReplicationShardStats

java.lang.Object
org.opensearch.index.SegmentReplicationShardStats
All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, org.opensearch.core.xcontent.ToXContentFragment

@PublicApi(since="2.7.0") public class SegmentReplicationShardStats extends Object implements org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContentFragment
SegRep stats for a single shard.
Opensearch.api:
  • Constructor Details

    • SegmentReplicationShardStats

      public SegmentReplicationShardStats(String allocationId, long checkpointsBehindCount, long bytesBehindCount, long currentReplicationTimeMillis, long currentReplicationLagMillis, long lastCompletedReplicationTime)
    • SegmentReplicationShardStats

      public SegmentReplicationShardStats(org.opensearch.core.common.io.stream.StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • getAllocationId

      public String getAllocationId()
    • getCheckpointsBehindCount

      public long getCheckpointsBehindCount()
    • getBytesBehindCount

      public long getBytesBehindCount()
    • getCurrentReplicationTimeMillis

      public long getCurrentReplicationTimeMillis()
    • getCurrentReplicationLagMillis

      public long getCurrentReplicationLagMillis()
      Total Replication lag observed.
      Returns:
      currentReplicationLagMillis
    • getLastCompletedReplicationTimeMillis

      public long getLastCompletedReplicationTimeMillis()
      Total time taken for replicas to catch up. Similar to replication lag except this doesn't include time taken by primary to upload data to remote store.
      Returns:
      lastCompletedReplicationTimeMillis
    • setCurrentReplicationState

      public void setCurrentReplicationState(SegmentReplicationState currentReplicationState)
    • getCurrentReplicationState

      @Nullable public SegmentReplicationState getCurrentReplicationState()
    • toXContent

      public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.opensearch.core.xcontent.ToXContent
      Throws:
      IOException
    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object