Package org.jboss.as.controller
Interface OperationContext.RollbackHandler
-
- Enclosing interface:
- OperationContext
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface OperationContext.RollbackHandler
Handler for a callback to anOperationStepHandler
indicating that the overall operation is being rolled back and the handler should revert any change it has made.
-
-
Field Summary
Fields Modifier and Type Field Description static OperationContext.RollbackHandler
NOOP_ROLLBACK_HANDLER
AOperationContext.RollbackHandler
that does nothing in the callback.static OperationContext.RollbackHandler
REVERT_RELOAD_REQUIRED_ROLLBACK_HANDLER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
handleRollback(OperationContext context, org.jboss.dmr.ModelNode operation)
Callback to anOperationStepHandler
indicating that the overall operation is being rolled back and the handler should revert any change it has made.
-
-
-
Field Detail
-
NOOP_ROLLBACK_HANDLER
static final OperationContext.RollbackHandler NOOP_ROLLBACK_HANDLER
AOperationContext.RollbackHandler
that does nothing in the callback. Intended for use by operation step handlers that do not need to do any clean up work -- e.g. those that only perform reads or those that only perform persistent configuration changes. (Persistent configuration changes need not be explicitly rolled back as theOperationContext
will handle that automatically.)
-
REVERT_RELOAD_REQUIRED_ROLLBACK_HANDLER
static final OperationContext.RollbackHandler REVERT_RELOAD_REQUIRED_ROLLBACK_HANDLER
AOperationContext.RollbackHandler
that callsOperationContext.revertReloadRequired()
. Intended for use by operation step handlers callOperationContext.reloadRequired()
and perform no other actions that need to be rolled back.
-
-
Method Detail
-
handleRollback
void handleRollback(OperationContext context, org.jboss.dmr.ModelNode operation)
Callback to anOperationStepHandler
indicating that the overall operation is being rolled back and the handler should revert any change it has made. A handler executing inOperationContext.Stage.MODEL
need not revert any changes it has made to the configuration model; this will be done automatically. A handler need not to remove services created by the operation; this will be done automatically.- Parameters:
context
- the operation execution context; will be the same as what was passed to theOperationStepHandler.execute(OperationContext, ModelNode)
method invocation that registered this rollback handler.operation
- the operation being rolled back; will be the same as what was passed to theOperationStepHandler.execute(OperationContext, ModelNode)
method invocation that registered this rollback handler.
-
-