Package org.elasticsearch.index.recovery
Class RecoveryStats
java.lang.Object
org.elasticsearch.index.recovery.RecoveryStats
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentFragment
public class RecoveryStats extends java.lang.Object implements ToXContentFragment, Writeable
Recovery related statistics, starting at the shard level and allowing aggregation to
indices and node level
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RecoveryStats()
RecoveryStats(StreamInput in)
-
Method Summary
Modifier and Type Method Description void
add(RecoveryStats recoveryStats)
void
addThrottleTime(long nanos)
void
addTotals(RecoveryStats recoveryStats)
int
currentAsSource()
Number of ongoing recoveries for which a shard serves as a sourceint
currentAsTarget()
Number of ongoing recoveries for which a shard serves as a targetvoid
decCurrentAsSource()
void
decCurrentAsTarget()
void
incCurrentAsSource()
void
incCurrentAsTarget()
TimeValue
throttleTime()
Total time recoveries waited due to throttlingjava.lang.String
toString()
XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
Constructor Details
-
RecoveryStats
public RecoveryStats() -
RecoveryStats
- Throws:
java.io.IOException
-
-
Method Details
-
add
-
addTotals
-
currentAsSource
public int currentAsSource()Number of ongoing recoveries for which a shard serves as a source -
currentAsTarget
public int currentAsTarget()Number of ongoing recoveries for which a shard serves as a target -
throttleTime
Total time recoveries waited due to throttling -
incCurrentAsTarget
public void incCurrentAsTarget() -
decCurrentAsTarget
public void decCurrentAsTarget() -
incCurrentAsSource
public void incCurrentAsSource() -
decCurrentAsSource
public void decCurrentAsSource() -
addThrottleTime
public void addThrottleTime(long nanos) -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput. -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-