Class RecoveryState.Timer
- java.lang.Object
-
- org.elasticsearch.indices.recovery.RecoveryState.Timer
-
- All Implemented Interfaces:
Streamable
- Direct Known Subclasses:
RecoveryState.Index
,RecoveryState.Translog
,RecoveryState.VerifyIndex
- Enclosing class:
- RecoveryState
public static class RecoveryState.Timer extends java.lang.Object implements Streamable
-
-
Field Summary
Fields Modifier and Type Field Description protected long
startNanoTime
protected long
startTime
protected long
stopTime
protected long
time
-
Constructor Summary
Constructors Constructor Description Timer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.void
reset()
void
start()
long
startTime()
Returns start time in millisvoid
stop()
long
stopTime()
Returns stop time in millislong
time()
Returns elapsed time in millis, or 0 if timer was not startedvoid
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, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.io.stream.Streamable
-
-
-
-
Method Detail
-
start
public void start()
-
startTime
public long startTime()
Returns start time in millis
-
time
public long time()
Returns elapsed time in millis, or 0 if timer was not started
-
stopTime
public long stopTime()
Returns stop time in millis
-
stop
public void stop()
-
reset
public void reset()
-
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
-
-