Package org.elasticsearch.index.recovery
Class RecoveryStats
- java.lang.Object
-
- org.elasticsearch.index.recovery.RecoveryStats
-
- All Implemented Interfaces:
Streamable
,ToXContent
,ToXContentFragment
public class RecoveryStats extends java.lang.Object implements ToXContentFragment, Streamable
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
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description RecoveryStats()
-
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()
void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.static RecoveryStats
readRecoveryStats(StreamInput in)
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 object's fields to a StreamOutput.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Method Detail
-
add
public void add(RecoveryStats recoveryStats)
-
addTotals
public void addTotals(RecoveryStats recoveryStats)
-
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
public TimeValue 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
-
readRecoveryStats
public static RecoveryStats readRecoveryStats(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-