Interface IBatchSessionController


public interface IBatchSessionController
Callback used by the batch mode of BM to bring additional control of the batch operations. In case if the descendant of this interface is being used as an externally provided handle to the IBmModel.beginBatchSession(Object) the system calls the corresponding methods of the callback during the batch lifecycle.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Object
    Provides originating service identifier for an executed batch
    default boolean
    Should return true if saving of all resources should be done in asynchronous mode, false - otherwise.
    boolean
    Returns true if saving of all resources can be done in parallel, false - otherwise.
    void
    Called right after enqueing all events being collected during the batch mode.
    void
    Called right after the end of saving of all resources being changed during the batch mode.
    void
    Called right before the event processing collected by the batch mode.
    void
    onBeforeSave(int taskCount)
    Called right before saving of all resources being changed during the batch mode.
  • Method Details

    • onBeforeEventProcessing

      void onBeforeEventProcessing()
      Called right before the event processing collected by the batch mode.
    • onAfterEventProcessing

      void onAfterEventProcessing()
      Called right after enqueing all events being collected during the batch mode.
    • onAfterSave

      void onAfterSave()
      Called right after the end of saving of all resources being changed during the batch mode.
    • onBeforeSave

      void onBeforeSave(int taskCount)
      Called right before saving of all resources being changed during the batch mode.
      Parameters:
      taskCount - The collected save task count.
    • isParallelSaveAllowed

      boolean isParallelSaveAllowed()
      Returns true if saving of all resources can be done in parallel, false - otherwise.
      Returns:
      true if saving of all resources can be done in parallel, false - otherwise.
    • isAsyncSaveRequired

      default boolean isAsyncSaveRequired()
      Should return true if saving of all resources should be done in asynchronous mode, false - otherwise.
      Returns:
      The async. save flag
    • getServiceId

      default Object getServiceId()
      Provides originating service identifier for an executed batch
      Returns:
      Identifier of an originating service. Can be null