public interface ChangeSetMember
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
.Modifier and Type | Method and Description |
---|---|
void |
cancel()
Defines how the underlying resource of this
ChangeSetMember can be cancelled (rolled back) |
void |
complete()
Defines how the underlying resource of this
ChangeSetMember can be completed (comitted) |
String |
getName()
The name should be directly linked to the resource the
ChangeSetMember manages, e.g. |
boolean |
isMarkedForCancel()
Defines, if the underlying resource of this
ChangeSetMember was requested to be cancelled (rolled back). |
String getName()
ChangeSetMember
manages, e.g. the PersistenceService
name.
It can be used to ensure that a resource is only registered once on a given ChangeSetContext
.ChangeSetMember
void complete()
ChangeSetMember
can be completed (comitted)void cancel()
ChangeSetMember
can be cancelled (rolled back)boolean isMarkedForCancel()
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.Copyright © 2022. All rights reserved.