Class QueueSharderPolicies.Builder

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

public static class QueueSharderPolicies.Builder extends Object
  • Method Details

    • 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()