org.apache.curator.framework.recipes.queue
Class QueueSharderPolicies.Builder

java.lang.Object
  extended by org.apache.curator.framework.recipes.queue.QueueSharderPolicies.Builder
Enclosing class:
QueueSharderPolicies

public static class QueueSharderPolicies.Builder
extends Object


Method Summary
 QueueSharderPolicies build()
           
 QueueSharderPolicies.Builder maxQueues(int maxQueues)
          Change the maximum number of queues to create.
 QueueSharderPolicies.Builder newQueueThreshold(int newQueueThreshold)
          Change the queue threshold.
 QueueSharderPolicies.Builder threadFactory(ThreadFactory threadFactory)
          Change the thread factory that's used to create the sharder's thread
 QueueSharderPolicies.Builder thresholdCheckMs(int thresholdCheckMs)
          Change the threshold check.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 is QueueSharderPolicies.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 is QueueSharderPolicies.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 is QueueSharderPolicies.DEFAULT_MAX_QUEUES

Parameters:
maxQueues - the new max
Returns:
this

threadFactory

public QueueSharderPolicies.Builder threadFactory(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()


Copyright © 2011–2014 The Apache Software Foundation. All rights reserved.