public interface

BucketProcessor

com.atlassian.stash.concurrent.BucketProcessor<T extends java.io.Serializable>

Class Overview

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.

Summary

Public Methods
void process(String bucketId, List<T> tasks)
Callback method for processing a 'bucket' of tasks.

Public Methods

public void process (String bucketId, 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.