protected boolean executeRpcCall(final ThreadPoolExecutor executor, final AtomicInteger queueSize,
    final CallRunner task) {
    // Executors provide no offer, so make our own.
    int queued = queueSize.getAndIncrement();
    if (maxQueueLength > 0 && queued >= maxQueueLength) {
      queueSize.decrementAndGet();
      return false;
    }

    executor.execute(new FifoCallRunner(task) {
      @Override
      public void run() {
        task.setStatus(RpcServer.getStatus());
        task.run();
        queueSize.decrementAndGet();
      }
    });

    return true;
  }
A very simple {@code }RpcScheduler} that serves incoming requests in order. This can be used for
HMaster, where no prioritization is needed.
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java