@InterfaceAudience.Private @InterfaceStability.Evolving public abstract class ProcedureInMemoryChore<TEnvironment> extends Procedure<TEnvironment>
Procedure.LockState
NO_PROC_ID, NO_TIMEOUT
Modifier | Constructor and Description |
---|---|
protected |
ProcedureInMemoryChore(int timeoutMsec) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
abort(TEnvironment env)
The abort() call is asynchronous and each procedure must decide how to deal
with it, if they want to be abortable.
|
protected void |
deserializeStateData(ProcedureStateSerializer serializer)
Called on store load to allow the user to decode the previously serialized
state.
|
protected Procedure<TEnvironment>[] |
execute(TEnvironment env)
The main code of the procedure.
|
protected abstract void |
periodicExecute(TEnvironment env) |
protected void |
rollback(TEnvironment env)
The code to undo what was done by the execute() code.
|
protected void |
serializeStateData(ProcedureStateSerializer serializer)
The user-level code of the procedure may have some state to
persist (e.g.
|
acquireLock, addStackIndex, afterReplay, beforeReplay, bypass, compareTo, completionCleanup, doAcquireLock, doExecute, doReleaseLock, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcedureMetrics, getProcId, getProcIdHashCode, getProcName, getResult, getRootProcedureId, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasOwner, hasParent, hasTimeout, haveSameParent, holdLock, incChildrenLatch, isBypass, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRunnable, isSuccess, isWaiting, isYieldAfterExecutionStep, lockedWhenLoading, needPersistence, releaseLock, removeStackIndex, resetPersistence, restoreLock, setAbortFailure, setChildrenLatch, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, shouldWaitClientAck, skipPersistence, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, toStringState, tryRunnable, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecuted
protected ProcedureInMemoryChore(int timeoutMsec)
protected abstract void periodicExecute(TEnvironment env)
protected Procedure<TEnvironment>[] execute(TEnvironment env)
Procedure
execute
in class Procedure<TEnvironment>
env
- the environment passed to the ProcedureExecutorprotected void rollback(TEnvironment env)
Procedure
rollback
in class Procedure<TEnvironment>
env
- the environment passed to the ProcedureExecutorprotected boolean abort(TEnvironment env)
Procedure
NOTE: abort() is not like Thread.interrupt(). It is just a notification that allows the procedure implementor abort.
abort
in class Procedure<TEnvironment>
protected void serializeStateData(ProcedureStateSerializer serializer) throws IOException
Procedure
serializeStateData
in class Procedure<TEnvironment>
serializer
- stores the serializable stateIOException
protected void deserializeStateData(ProcedureStateSerializer serializer) throws IOException
Procedure
deserializeStateData
in class Procedure<TEnvironment>
serializer
- contains the serialized stateIOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.