Package com.sap.cds.services.runtime
Interface ChangeSetContextRunner
public interface ChangeSetContextRunner
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(Consumer<ChangeSetContext> changeSetHandler) Opens aChangeSetContext
and runs the given handler within its scope.<T> T
run
(Function<ChangeSetContext, T> changeSetHandler) Opens aChangeSetContext
and runs the given handler within its scope.
-
Method Details
-
run
Opens aChangeSetContext
and runs the given handler within its scope. TheChangeSetContext
marks a scope in which all opened transactions etc. are committed cancelled together. Note that single transactions may fail during commit but others might be successful.The
ChangeSetContext
will be propagated to allEventContext
instances in the service call hierarchy.- Type Parameters:
T
- The type of the response- Parameters:
changeSetHandler
- The handler for processing the request within the context- Returns:
- A generic response object of the handler
-
run
Opens aChangeSetContext
and runs the given handler within its scope. TheChangeSetContext
marks a scope in which all opened transactions etc. are committed cancelled together. Note that single transactions may fail during commit but others might be successful.The
ChangeSetContext
will be propagated to allEventContext
instances in the service call hierarchy.- Parameters:
changeSetHandler
- The handler for processing the request within the context
-