Class QueueSharderPolicies.Builder
java.lang.Object
org.apache.curator.framework.recipes.queue.QueueSharderPolicies.Builder
- Enclosing class:
QueueSharderPolicies
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
maxQueues
(int maxQueues) Change the maximum number of queues to create.newQueueThreshold
(int newQueueThreshold) Change the queue threshold.threadFactory
(ThreadFactory threadFactory) Change the thread factory that's used to create the sharder's threadthresholdCheckMs
(int thresholdCheckMs) Change the threshold check.
-
Method Details
-
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
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
Change the maximum number of queues to create. The default value isQueueSharderPolicies.DEFAULT_MAX_QUEUES
- Parameters:
maxQueues
- the new max- Returns:
- this
-
threadFactory
Change the thread factory that's used to create the sharder's thread- Parameters:
threadFactory
- new factory- Returns:
- this
-
build
-