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.
Handler for a callback to an
OperationStepHandler indicating that the overall operation is being
rolled back and the handler should revert any change it has made.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OperationContext.RollbackHandlerAOperationContext.RollbackHandlerthat does nothing in the callback.static final OperationContext.RollbackHandler -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleRollback(OperationContext context, org.jboss.dmr.ModelNode operation) Callback to anOperationStepHandlerindicating that the overall operation is being rolled back and the handler should revert any change it has made.
-
Field Details
-
NOOP_ROLLBACK_HANDLER
AOperationContext.RollbackHandlerthat 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 theOperationContextwill handle that automatically.) -
REVERT_RELOAD_REQUIRED_ROLLBACK_HANDLER
AOperationContext.RollbackHandlerthat callsOperationContext.revertReloadRequired(). Intended for use by operation step handlers callOperationContext.reloadRequired()and perform no other actions that need to be rolled back.
-
-
Method Details
-
handleRollback
Callback to anOperationStepHandlerindicating that the overall operation is being rolled back and the handler should revert any change it has made. A handler executing inOperationContext.Stage.MODELneed 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.
-