@InterfaceAudience.Private @InterfaceStability.Evolving public abstract class ProcedureInMemoryChore<TEnvironment> extends Procedure<TEnvironment>
| 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 that, if they want to be abortable.
|
void |
deserializeStateData(InputStream stream)
Called on store load to allow the user to decode the previously serialized
state.
|
protected Procedure[] |
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 done by the execute() code.
|
void |
serializeStateData(OutputStream stream)
The user-level code of the procedure may have some state to
persist (e.g.
|
acquireLock, addStackIndex, beforeReplay, childrenCountDown, compareTo, completionCleanup, convert, convert, createProcedureInfo, doExecute, doRollback, elapsedTime, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcId, getProcIdHashCode, getResult, getRootProcedureId, getStackIndexes, getStartTime, getState, getTimeout, getTimeRemaining, hasChildren, hasException, hasOwner, hasParent, hasTimeout, incChildrenLatch, isFailed, isFinished, isRunnable, isSuccess, isWaiting, isYieldAfterExecutionStep, newInstance, releaseLock, removeStackIndex, setAbortFailure, setChildrenLatch, setFailure, setFailure, setNonceKey, setOwner, setParentProcId, setProcId, setResult, setStackIndexes, setStartTime, setState, setTimeout, setTimeoutFailure, shouldWaitClientAck, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, toStringState, updateTimestamp, validateClass, wasExecutedprotected abstract void periodicExecute(TEnvironment env)
protected Procedure[] execute(TEnvironment env)
Procedureexecute in class Procedure<TEnvironment>env - the environment passed to the ProcedureExecutorprotected void rollback(TEnvironment env)
Procedurerollback in class Procedure<TEnvironment>env - the environment passed to the ProcedureExecutorprotected boolean abort(TEnvironment env)
Procedureabort in class Procedure<TEnvironment>public void serializeStateData(OutputStream stream)
ProcedureserializeStateData in class Procedure<TEnvironment>stream - the stream that will contain the user serialized datapublic void deserializeStateData(InputStream stream)
ProceduredeserializeStateData in class Procedure<TEnvironment>stream - the stream that contains the user serialized dataCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.