Class BucketedExecutorSettings<T extends Serializable>
java.lang.Object
com.atlassian.bitbucket.concurrent.BucketedExecutorSettings<T>
- Type Parameters:
T
- type task type
Configuration object used for
constructing
BucketedExecutor
instances.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
int
-
Method Details
-
getBatchSize
public int getBatchSize()- Returns:
- the number of items from a bucket that should be processed in a single
BucketProcessor
run. The number of items that are passed to aBucketProcessor
is guaranteed to be <= the configured batch size.
-
getBucketIdExtractor
- Returns:
- the function used to group items in buckets
-
getMaxAttempts
public int getMaxAttempts()- Returns:
- the maximum number of times processing of a bucket should be attempted
-
getMaxConcurrency
public int getMaxConcurrency()- Returns:
- the maximum number of different buckets that can be concurrently processed
-
getMaxConcurrencyPolicy
- Returns:
- the concurrency policy. If the concurrency policy is
ConcurrencyPolicy.PER_CLUSTER
, themaximum concurrency
is translated into a per-node maximum by dividing the maximum by the number of nodes in the cluster (rounded up).
-
getProcessor
- Returns:
- the processor responsible for processing buckets of tasks
-