public class

BucketedExecutorSettings

extends Object
java.lang.Object
   ↳ com.atlassian.bitbucket.concurrent.BucketedExecutorSettings<T extends java.io.Serializable>

Class Overview

Configuration object used for constructing BucketedExecutor instances.

Summary

Nested Classes
class BucketedExecutorSettings.Builder<T extends Serializable> Builder for BucketedExecutorSettings 
Public Methods
int getBatchSize()
@Nonnull Function<T, String> getBucketIdExtractor()
int getMaxAttempts()
int getMaxConcurrency()
@Nonnull ConcurrencyPolicy getMaxConcurrencyPolicy()
@Nonnull BucketProcessor<T> getProcessor()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

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 a BucketProcessor is guaranteed to be <= the configured batch size.

@Nonnull public Function<T, String> getBucketIdExtractor ()

Returns
  • the function used to group items in buckets

public int getMaxAttempts ()

Returns
  • the maximum number of times processing of a bucket should be attempted

public int getMaxConcurrency ()

Returns
  • the maximum number of different buckets that can be concurrently processed

@Nonnull public ConcurrencyPolicy getMaxConcurrencyPolicy ()

Returns
  • the concurrency policy. If the concurrency policy is PER_CLUSTER, the maximum concurrency is translated into a per-node maximum by dividing the maximum by the number of nodes in the cluster (rounded up).

@Nonnull public BucketProcessor<T> getProcessor ()

Returns
  • the processor responsible for processing buckets of tasks