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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The stage of the recovery stateNested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionSegmentReplicationState
(ShardRouting shardRouting, ReplicationLuceneIndex index, long replicationId, String sourceDescription, DiscoveryNode targetNode) SegmentReplicationState
(org.opensearch.core.common.io.stream.StreamInput in) -
Method Summary
Modifier and TypeMethodDescriptionorg.opensearch.common.unit.TimeValue
org.opensearch.common.unit.TimeValue
org.opensearch.common.unit.TimeValue
org.opensearch.common.unit.TimeValue
getIndex()
org.opensearch.common.unit.TimeValue
long
getStage()
getTimer()
void
org.opensearch.core.xcontent.XContentBuilder
toXContent
(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) protected void
void
writeTo
(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
SegmentReplicationState
public SegmentReplicationState(ShardRouting shardRouting, ReplicationLuceneIndex index, long replicationId, String sourceDescription, DiscoveryNode targetNode) -
SegmentReplicationState
public SegmentReplicationState(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Throws:
IOException
-
-
Method Details
-
getShardRouting
-
getIndex
- Specified by:
getIndex
in interfaceReplicationState
-
getReplicationId
public long getReplicationId() -
getTimer
- Specified by:
getTimer
in interfaceReplicationState
-
getStage
-
getSourceDescription
-
getTargetNode
-
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
- Specified by:
writeTo
in interfaceorg.opensearch.core.common.io.stream.Writeable
- Throws:
IOException
-
validateAndSetStage
protected void validateAndSetStage(SegmentReplicationState.Stage expected, SegmentReplicationState.Stage next) -
setStage
-
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 interfaceorg.opensearch.core.xcontent.ToXContent
- Throws:
IOException
-