Interface ChangeSetMember

All Known Implementing Classes:
ChangeSetMemberDelegate

public interface ChangeSetMember
A ChangeSetMember links a certain resource to a ChangeSetContext. It defines how this resource is completed (committed) or cancelled (rolled back). A common implementation of a ChangeSetMember is the ChangeSetMemberDelegate, which wraps a given TransactionManager.
  • Method Details

    • getName

      String getName()
      The name should be directly linked to the resource the ChangeSetMember manages, e.g. the PersistenceService name. It can be used to ensure that a resource is only registered once on a given ChangeSetContext.
      Returns:
      the name of the ChangeSetMember
    • complete

      void complete()
      Defines how the underlying resource of this ChangeSetMember can be completed (comitted)
    • cancel

      void cancel()
      Defines how the underlying resource of this ChangeSetMember can be cancelled (rolled back)
    • isMarkedForCancel

      boolean isMarkedForCancel()
      Defines, if the underlying resource of this ChangeSetMember was requested to be cancelled (rolled back). Please note that usually a ChangeSetContext is marked for cancel as a whole through ChangeSetContext.markForCancel() This method is mainly intended if there is some other (outside) API available, that could set the cancellation marker on the underlying resource.
      Returns:
      true, if the underlying resource was marked for cancellation through some (outside) API.