Class QueueSharderPolicies.Builder
- java.lang.Object
-
- org.apache.curator.framework.recipes.queue.QueueSharderPolicies.Builder
-
- Enclosing class:
- QueueSharderPolicies
public static class QueueSharderPolicies.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueueSharderPoliciesbuild()QueueSharderPolicies.BuildermaxQueues(int maxQueues)Change the maximum number of queues to create.QueueSharderPolicies.BuildernewQueueThreshold(int newQueueThreshold)Change the queue threshold.QueueSharderPolicies.BuilderthreadFactory(java.util.concurrent.ThreadFactory threadFactory)Change the thread factory that's used to create the sharder's threadQueueSharderPolicies.BuilderthresholdCheckMs(int thresholdCheckMs)Change the threshold check.
-
-
-
Method Detail
-
newQueueThreshold
public QueueSharderPolicies.Builder newQueueThreshold(int newQueueThreshold)
Change the queue threshold. This is the number of items that causes a new queue to be added. The default isQueueSharderPolicies.DEFAULT_QUEUE_THRESHOLD- Parameters:
newQueueThreshold- new value- Returns:
- this
-
thresholdCheckMs
public QueueSharderPolicies.Builder thresholdCheckMs(int thresholdCheckMs)
Change the threshold check. This is how often the queue sizes are checked. The default isQueueSharderPolicies.DEFAULT_THRESHOLD_CHECK_MS- Parameters:
thresholdCheckMs- period in milliseconds- Returns:
- this
-
maxQueues
public QueueSharderPolicies.Builder maxQueues(int maxQueues)
Change the maximum number of queues to create. The default value isQueueSharderPolicies.DEFAULT_MAX_QUEUES- Parameters:
maxQueues- the new max- Returns:
- this
-
threadFactory
public QueueSharderPolicies.Builder threadFactory(java.util.concurrent.ThreadFactory threadFactory)
Change the thread factory that's used to create the sharder's thread- Parameters:
threadFactory- new factory- Returns:
- this
-
build
public QueueSharderPolicies build()
-
-