Class AddConfigNodeProcedure
java.lang.Object
org.apache.iotdb.confignode.procedure.Procedure<Env>
org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure<ConfigNodeProcedureEnv,TState>
org.apache.iotdb.confignode.procedure.impl.node.AbstractNodeProcedure<AddConfigNodeState>
org.apache.iotdb.confignode.procedure.impl.node.AddConfigNodeProcedure
- All Implemented Interfaces:
Comparable<Procedure<ConfigNodeProcedureEnv>>
add config node procedure
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure
StateMachineProcedure.Flow -
Field Summary
Fields inherited from class org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure
isGeneratedByPipeFields inherited from class org.apache.iotdb.confignode.procedure.Procedure
NO_PROC_ID, NO_TIMEOUT -
Constructor Summary
ConstructorsConstructorDescriptionAddConfigNodeProcedure(TConfigNodeLocation tConfigNodeLocation, TNodeVersionInfo versionInfo) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(ByteBuffer byteBuffer) booleanprotected StateMachineProcedure.FlowexecuteFromState(ConfigNodeProcedureEnv env, AddConfigNodeState state) Called to perform a single step of the specified 'state' of the procedure.protected AddConfigNodeStateReturn the initial state object that will be used for the first call to executeFromState().protected AddConfigNodeStategetState(int stateId) Convert an ordinal (or state id) to an Enum (or more descriptive) state object.protected intgetStateId(AddConfigNodeState deleteStorageGroupState) Convert the Enum (or more descriptive) state object to an ordinal (or state id).inthashCode()protected booleanUsed by the default implementation of abort() to know if the current state can be aborted and rollback can be triggered.protected voidrollbackState(ConfigNodeProcedureEnv env, AddConfigNodeState state) Called to perform the rollback of the specified state.voidserialize(DataOutputStream stream) Methods inherited from class org.apache.iotdb.confignode.procedure.impl.node.AbstractNodeProcedure
acquireLock, releaseLockMethods inherited from class org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure
addChildProcedure, execute, getCurrentState, getCycles, isEofState, isStateDeserialized, rollback, setNextState, toStringStateMethods inherited from class org.apache.iotdb.confignode.procedure.Procedure
addStackIndex, compareTo, deserializeTypeInfoForCompatibility, doAcquireLock, doExecute, doReleaseLock, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getParentProcId, getProcId, getProcType, getResult, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasParent, hasTimeout, haveSameParent, holdLock, incChildrenLatch, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRunnable, isSuccess, isWaiting, isYieldAfterExecution, removeStackIndex, restoreLock, setChildrenLatch, setFailure, setFailure, setLastUpdate, setParentProcId, setProcId, setProcRunnable, setResult, setRootProcedureId, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, toString, toStringClassDetails, toStringDetails, toStringSimpleSB, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, wasExecuted
-
Constructor Details
-
AddConfigNodeProcedure
public AddConfigNodeProcedure() -
AddConfigNodeProcedure
public AddConfigNodeProcedure(TConfigNodeLocation tConfigNodeLocation, TNodeVersionInfo versionInfo)
-
-
Method Details
-
executeFromState
protected StateMachineProcedure.Flow executeFromState(ConfigNodeProcedureEnv env, AddConfigNodeState state) Description copied from class:StateMachineProcedureCalled to perform a single step of the specified 'state' of the procedure.- Specified by:
executeFromStatein classStateMachineProcedure<ConfigNodeProcedureEnv,AddConfigNodeState> state- state to execute- Returns:
- Flow.NO_MORE_STATE if the procedure is completed, Flow.HAS_MORE_STATE if there is another step.
-
rollbackState
protected void rollbackState(ConfigNodeProcedureEnv env, AddConfigNodeState state) throws ProcedureException Description copied from class:StateMachineProcedureCalled to perform the rollback of the specified state.- Specified by:
rollbackStatein classStateMachineProcedure<ConfigNodeProcedureEnv,AddConfigNodeState> state- state to rollback- Throws:
ProcedureException
-
isRollbackSupported
Description copied from class:StateMachineProcedureUsed by the default implementation of abort() to know if the current state can be aborted and rollback can be triggered.- Overrides:
isRollbackSupportedin classStateMachineProcedure<ConfigNodeProcedureEnv,AddConfigNodeState>
-
getState
Description copied from class:StateMachineProcedureConvert an ordinal (or state id) to an Enum (or more descriptive) state object.- Specified by:
getStatein classStateMachineProcedure<ConfigNodeProcedureEnv,AddConfigNodeState> - Parameters:
stateId- the ordinal() of the state enum (or state id)- Returns:
- the state enum object
-
getStateId
Description copied from class:StateMachineProcedureConvert the Enum (or more descriptive) state object to an ordinal (or state id).- Specified by:
getStateIdin classStateMachineProcedure<ConfigNodeProcedureEnv,AddConfigNodeState> - Parameters:
deleteStorageGroupState- the state enum object- Returns:
- stateId the ordinal() of the state enum (or state id)
-
getInitialState
Description copied from class:StateMachineProcedureReturn the initial state object that will be used for the first call to executeFromState().- Specified by:
getInitialStatein classStateMachineProcedure<ConfigNodeProcedureEnv,AddConfigNodeState> - Returns:
- the initial state enum object
-
serialize
- Overrides:
serializein classStateMachineProcedure<ConfigNodeProcedureEnv,AddConfigNodeState> - Throws:
IOException
-
deserialize
- Overrides:
deserializein classStateMachineProcedure<ConfigNodeProcedureEnv,AddConfigNodeState>
-
equals
-
hashCode
public int hashCode()
-