@Override
  public boolean dispatch(final CallRunner callTask) {
    int queueIndex = balancer.getNextQueue(callTask);
    BlockingQueue<CallRunner> queue = queues.get(queueIndex);
    // that means we can overflow by at most <num reader> size (5), that's ok
    if (queue.size() >= currentQueueLimit) {
      return false;
    }
    return queue.offer(callTask);
  }
An {@link RpcExecutor} that will balance requests evenly across all its queues, but still remains
efficient with a single queue via an inlinable queue balancing mechanism. Defaults to FIFO but
you can pass an alternate queue class to use.
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/BalancedQueueRpcExecutor.java