public abstract class AbstractState<T extends java.lang.Enum<T>,I> extends AbstractCompletable<I> implements State<T,I>
AbstractCompletable.BasePhase, AbstractCompletable.BaseSkipPhase
Completable.Result
Modifier and Type | Field and Description |
---|---|
static int |
COMPLETE |
protected int |
currentState |
static int |
INIT |
protected long[] |
stateTimesNanos |
id, lastUpdatedAtNs
Constructor and Description |
---|
AbstractState(I id,
java.lang.Class<T> klass) |
Modifier and Type | Method and Description |
---|---|
int |
getCurrentState() |
java.util.EnumMap<T,java.lang.Long> |
getStateTimesMillis() |
T |
getStatus() |
protected void |
onComplete() |
protected void |
updateState(T state) |
getId, getInitializedAtMillis, getInitializedAtNanos, getLastUpdatedAtMillis, getLastUpdatedAtNanos, getResult, nanosToMillis, tryResult, updated
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDurationMillis, getFailureCause, getId, getInitializedAtMillis, getInitializedAtNanos, getLastUpdatedAtMillis, getLastUpdatedAtNanos, getResult, getSuccessMessage, isComplete
public static final int INIT
public static final int COMPLETE
protected final long[] stateTimesNanos
protected int currentState
public T getStatus()
public int getCurrentState()
public java.util.EnumMap<T,java.lang.Long> getStateTimesMillis()
getStateTimesMillis
in interface State<T extends java.lang.Enum<T>,I>
protected void onComplete()
onComplete
in class AbstractCompletable<I>
protected void updateState(T state)
Copyright © 2009- The Apache Software Foundation