Class CompensatableActionImpl

    • Constructor Detail

      • CompensatableActionImpl

        public CompensatableActionImpl()
    • Method Detail

      • addWork

        public CompensatableAction addWork​(CompensatableWork compensatableWork,
                                           CompensationHandler compensationHandler)
        Description copied from interface: CompensatableAction
        Add a piece of work to the action with a compensation handler.
        Specified by:
        addWork in interface CompensatableAction
        Parameters:
        compensatableWork - Work that needs to be executed atomically.
        compensationHandler - Handler which needs to be invoked in case of failure to undo the work.
        Returns:
        this instance of CompensatableAction.
      • addWork

        public CompensatableAction addWork​(CompensatableWork compensatableWork,
                                           ConfirmationHandler confirmationHandler)
        Description copied from interface: CompensatableAction
        Add a piece of work to the action with a confirmation handler.
        Specified by:
        addWork in interface CompensatableAction
        Parameters:
        compensatableWork - Work that needs to be executed atomically.
        confirmationHandler - Handler which needs to be invoked if action is completed successfully.
        Returns:
        this instance of CompensatableAction
      • addWork

        public CompensatableAction addWork​(CompensatableWork compensatableWork,
                                           CompensationHandler compensationHandler,
                                           ConfirmationHandler confirmationHandler)
        Description copied from interface: CompensatableAction
        Add a piece of work to the action with a compensation and a confirmation handlers.
        Specified by:
        addWork in interface CompensatableAction
        Parameters:
        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.
        Returns:
        this instance of CompensatableAction