Interface ChangeSetContextRunner


public interface ChangeSetContextRunner
  • Method Details

    • run

      <T> T run(Function<ChangeSetContext,T> changeSetHandler)
      Opens a ChangeSetContext and runs the given handler within its scope. The ChangeSetContext 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 all EventContext 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

      void run(Consumer<ChangeSetContext> changeSetHandler)
      Opens a ChangeSetContext and runs the given handler within its scope. The ChangeSetContext 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 all EventContext instances in the service call hierarchy.

      Parameters:
      changeSetHandler - The handler for processing the request within the context