Class AbstractState<T extends java.lang.Enum<T>,I>
- java.lang.Object
-
- org.apache.cassandra.repair.state.AbstractCompletable<I>
-
- org.apache.cassandra.repair.state.AbstractState<T,I>
-
- All Implemented Interfaces:
Completable<I>,State<T,I>
- Direct Known Subclasses:
CoordinatorState,JobState,SessionState,ValidationState
public abstract class AbstractState<T extends java.lang.Enum<T>,I> extends AbstractCompletable<I> implements State<T,I>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.repair.state.AbstractCompletable
AbstractCompletable.BasePhase, AbstractCompletable.BaseSkipPhase
-
Nested classes/interfaces inherited from interface org.apache.cassandra.repair.state.Completable
Completable.Result
-
-
Field Summary
Fields Modifier and Type Field Description static intCOMPLETEprotected intcurrentStatestatic intINITprotected long[]stateTimesNanos-
Fields inherited from class org.apache.cassandra.repair.state.AbstractCompletable
id, lastUpdatedAtNs
-
-
Constructor Summary
Constructors Constructor Description AbstractState(I id, java.lang.Class<T> klass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCurrentState()java.util.EnumMap<T,java.lang.Long>getStateTimesMillis()TgetStatus()protected voidonComplete()protected voidupdateState(T state)-
Methods inherited from class org.apache.cassandra.repair.state.AbstractCompletable
getId, getInitializedAtMillis, getInitializedAtNanos, getLastUpdatedAtMillis, getLastUpdatedAtNanos, getResult, nanosToMillis, tryResult, updated
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.repair.state.Completable
getDurationMillis, getFailureCause, getId, getInitializedAtMillis, getInitializedAtNanos, getLastUpdatedAtMillis, getLastUpdatedAtNanos, getResult, getSuccessMessage, isComplete
-
-
-
-
Field Detail
-
INIT
public static final int INIT
- See Also:
- Constant Field Values
-
COMPLETE
public static final int COMPLETE
- See Also:
- Constant Field Values
-
stateTimesNanos
protected final long[] stateTimesNanos
-
currentState
protected int currentState
-
-
Method Detail
-
getStatus
public T getStatus()
-
getCurrentState
public int getCurrentState()
-
getStateTimesMillis
public java.util.EnumMap<T,java.lang.Long> getStateTimesMillis()
- Specified by:
getStateTimesMillisin interfaceState<T extends java.lang.Enum<T>,I>
-
onComplete
protected void onComplete()
- Overrides:
onCompletein classAbstractCompletable<I>
-
updateState
protected void updateState(T state)
-
-