Interface BulkWorkerRuntime


public interface BulkWorkerRuntime
This object is supplied to CAF Workers which are able to process multiple tasks together. It allows them to request additional tasks.
  • Method Details

    • getNextWorkerTask

      WorkerTask getNextWorkerTask()
      Retrieves another task to be processed. This method does not block; if a task is not readily available then null is returned immediately.
      Returns:
      the next task to be processed or null if a task is not readily available
    • getNextWorkerTask

      WorkerTask getNextWorkerTask(long millis) throws InterruptedException
      Retrieves another task to be processed. If a task is not readily available then this method will block waiting for a task for the specified number of milliseconds, after which it will return null if a task is still not available.
      Parameters:
      millis - the maximum number of milliseconds to wait on a task
      Returns:
      the next task to be processed or null if a task is not available
      Throws:
      InterruptedException - if the thread is interrupted while blocking