public interface ChangeSetContext
ChangeSetContext
defines the transactional boundaries around one or multiple Service.emit(com.sap.cds.services.EventContext)
calls.
It can be used by Handler
or other participants to ensure that changes, which were done as part of a ChangeSetContext are canceled (rolled back).
ChangeSetListener
Modifier and Type | Method and Description |
---|---|
boolean |
isMarkedForCancel() |
void |
markForCancel()
Marks the
ChangeSetContext to be cancelled. |
void |
register(ChangeSetListener listener)
Registers a
ChangeSetListener on the ChangeSetContext , to be notified once the ChangeSetContext is closed successfully or cancelled. |
void markForCancel()
ChangeSetContext
to be cancelled. When the ChangeSet is finished, transactions will be rolled back.boolean isMarkedForCancel()
markForCancel()
was called at least once, false otherwisevoid register(ChangeSetListener listener)
ChangeSetListener
on the ChangeSetContext
, to be notified once the ChangeSetContext
is closed successfully or cancelled.listener
- the ChangeSetListener
Copyright © 2020. All rights reserved.