Interface BatchHandler


public interface BatchHandler
Allows wrapping Listener.accept(List) and CursorManager.onSuccess(String, Cursor) inside one transaction, with automatic rollback if cursor commit fails. This is mainly useful when cursors are persisted in the same transactional datasource that the listener is using. Be careful when using this with a ManagedCursorManager, as it is possible that the response from a successful commit gets lost by the network. When the actions of the Listener are now rolled back, those events won't be received again.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    processBatch(IORunnable continuation)
     
  • Method Details

    • processBatch

      void processBatch(IORunnable continuation) throws IOException
      Parameters:
      continuation - A closure which will process the current batch when called.
      Throws:
      IOException