public interface CompensatableAction
| Modifier and Type | Method and Description |
|---|---|
CompensatableAction |
addWork(CompensatableWork compensatableWork,
CompensationHandler compensationHandler)
Add a piece of work to the action with a compensation handler.
|
CompensatableAction |
addWork(CompensatableWork compensatableWork,
CompensationHandler compensationHandler,
ConfirmationHandler confirmationHandler)
Add a piece of work to the action with a compensation and a confirmation handlers.
|
CompensatableAction |
addWork(CompensatableWork compensatableWork,
ConfirmationHandler confirmationHandler)
Add a piece of work to the action with a confirmation handler.
|
void |
execute()
Execute all registered work pieces one by one.
|
CompensatableAction addWork(CompensatableWork compensatableWork, CompensationHandler compensationHandler)
compensatableWork - Work that needs to be executed atomically.compensationHandler - Handler which needs to be invoked in case of failure to undo the work.CompensatableAction addWork(CompensatableWork compensatableWork, ConfirmationHandler confirmationHandler)
compensatableWork - Work that needs to be executed atomically.confirmationHandler - Handler which needs to be invoked if action is completed successfully.CompensatableAction addWork(CompensatableWork compensatableWork, CompensationHandler compensationHandler, ConfirmationHandler confirmationHandler)
compensatableWork - Work that needs to be executed atomically.compensationHandler - Handler which needs to be invoked in case of failure to undo the work.confirmationHandler - Handler which needs to be invoked if action is completed successfully.void execute()
throws EnlistException
EnlistException - Is thrown if action fails to register any handler with the transaction.Copyright © 2022 JBoss by Red Hat. All rights reserved.