Package org.opensearch.index
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:
-
Nested Class Summary
Nested 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
ConstructorDescriptionSegmentReplicationShardStats
(String allocationId, long checkpointsBehindCount, long bytesBehindCount, long currentReplicationTimeMillis, long currentReplicationLagMillis, long lastCompletedReplicationTime) SegmentReplicationShardStats
(org.opensearch.core.common.io.stream.StreamInput in) -
Method Summary
Modifier and TypeMethodDescriptionlong
long
long
Total Replication lag observed.long
long
Total time taken for replicas to catch up.void
setCurrentReplicationState
(SegmentReplicationState currentReplicationState) toString()
org.opensearch.core.xcontent.XContentBuilder
toXContent
(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) void
writeTo
(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
-
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
-
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
-
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 interfaceorg.opensearch.core.xcontent.ToXContent
- Throws:
IOException
-
writeTo
- Specified by:
writeTo
in interfaceorg.opensearch.core.common.io.stream.Writeable
- Throws:
IOException
-
toString
-