Interface BucketProcessor<T extends Serializable>

Type Parameters:
T - the task type

public interface BucketProcessor<T extends Serializable>
BucketedExecutor processor that's called when a bucket of tasks is ready for processing. Implementations need to ensure that the processing of a bucket of tasks completes or fails as a whole; when process(String, List) fails and the BucketedExecutor has been configured to retry processing, the whole bucket will be retried at a later time.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    process(String bucketId, List<T> tasks)
    Callback method for processing a 'bucket' of tasks.
  • Method Details

    • process

      void process(@Nonnull String bucketId, @Nonnull List<T> tasks)
      Callback method for processing a 'bucket' of tasks. Implementations need to ensure that processing of a bucket of tasks succeeds or fails as a whole. If the process method throws an exception and the executor has been configured to retry processing, all items in tasks will be re-offered at a later time.
      Parameters:
      bucketId - the bucket ID as determined by the configured ID extractor function.
      tasks - the tasks that are ready for processing (at most batch size items.