code: public DistributedPriorityQueue<T>      buildPriorityQueue(int minItemsBeforeRefresh)
      {
          return new DistributedPriorityQueue<T>
          (
              client,
              consumer,
              serializer,
              queuePath,
              factory,
              executor,
              minItemsBeforeRefresh,
              lockPath,
              maxItems,
              putInBackground,
              finalFlushMs
          );
      }
docs: <p>Build a {@link DistributedPriorityQueue} from the current builder values.</p>
  
  <p>When the priority
  queue detects an item addition/removal, it will stop processing its current list of items and
  refresh the list. <code>minItemsBeforeRefresh</code> modifies this. It determines the minimum
  number of items from the active list that will get processed before a refresh.</p>
  
  <p>Due to a quirk in the way ZooKeeper notifies changes, the queue will get an item addition/remove
  notification after <b>every</b> item is processed. This can lead to poor performance. Set
  <code>minItemsBeforeRefresh</code> to the value your application can tolerate being out of sync.</p>
  
  <p>For example: if the queue sees 10 items to process, it will end up making 10 calls to ZooKeeper
  to check status. You can control this by setting <code>minItemsBeforeRefresh</code> to 10 (or more)
  and the queue will only refresh with ZooKeeper after 10 items are processed</p>
  
  @param minItemsBeforeRefresh minimum items to process before refreshing the item list
  @return distributed priority queue