T
- the task typepublic static class BucketedExecutorSettings.Builder<T extends Serializable> extends Object
BucketedExecutorSettings
Constructor and Description |
---|
Builder(Function<T,String> bucketIdExtractor,
BucketProcessor<T> processor) |
Modifier and Type | Method and Description |
---|---|
BucketedExecutorSettings.Builder<T> |
batchSize(int value) |
BucketedExecutorSettings<T> |
build() |
BucketedExecutorSettings.Builder<T> |
maxAttempts(int value) |
BucketedExecutorSettings.Builder<T> |
maxConcurrency(int value,
ConcurrencyPolicy policy) |
public BucketedExecutorSettings.Builder<T> batchSize(int value)
value
- the number of items from a bucket that should be processed in a single BucketProcessor
run. The number of items that are passed to a BucketProcessor
is guaranteed to be <=
the configured batch size.this
public BucketedExecutorSettings<T> build()
public BucketedExecutorSettings.Builder<T> maxAttempts(int value)
value
- the maximum number of times processing of a bucket should be attemptedthis
public BucketedExecutorSettings.Builder<T> maxConcurrency(int value, ConcurrencyPolicy policy)
value
- the maximum number of different buckets that can be concurrently processed. In a clustered
instance, this maximum is translated into a per-node maximum by dividing the maximum by the
number of nodes in the cluster (rounded up).policy
- the concurrency policythis
Copyright © 2019 Atlassian. All rights reserved.