Class SegmentReplicationState

java.lang.Object
org.opensearch.indices.replication.SegmentReplicationState
All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, org.opensearch.core.xcontent.ToXContentFragment, ReplicationState

@PublicApi(since="2.2.0") public class SegmentReplicationState extends Object implements ReplicationState, org.opensearch.core.xcontent.ToXContentFragment, org.opensearch.core.common.io.stream.Writeable
ReplicationState implementation to track Segment Replication events.
Opensearch.api:
  • Constructor Details

  • Method Details

    • getShardRouting

      public ShardRouting getShardRouting()
    • getIndex

      public ReplicationLuceneIndex getIndex()
      Specified by:
      getIndex in interface ReplicationState
    • getReplicationId

      public long getReplicationId()
    • getTimer

      public ReplicationTimer getTimer()
      Specified by:
      getTimer in interface ReplicationState
    • getStage

      public SegmentReplicationState.Stage getStage()
    • getSourceDescription

      public String getSourceDescription()
    • getTargetNode

      public DiscoveryNode getTargetNode()
    • getTimingData

      public Map<String,Long> getTimingData()
    • getReplicatingStageTime

      public org.opensearch.common.unit.TimeValue getReplicatingStageTime()
    • getGetCheckpointInfoStageTime

      public org.opensearch.common.unit.TimeValue getGetCheckpointInfoStageTime()
    • getFileDiffStageTime

      public org.opensearch.common.unit.TimeValue getFileDiffStageTime()
    • getGetFileStageTime

      public org.opensearch.common.unit.TimeValue getGetFileStageTime()
    • getFinalizeReplicationStageTime

      public org.opensearch.common.unit.TimeValue getFinalizeReplicationStageTime()
    • 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
    • validateAndSetStage

      protected void validateAndSetStage(SegmentReplicationState.Stage expected, SegmentReplicationState.Stage next)
    • setStage

      public void setStage(SegmentReplicationState.Stage stage)
    • 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