code: public ExecutorService getOrBuildWorkerExecutor(Map<String, ExecutorService> boundWorkerExecutors)
      {
          if (workerExecutorKey.isPresent()) {
              checkState(!workerExecutor.isPresent(),
                         "Worker executor key should not be set along with a specific worker executor instance");
              checkState(!workerThreads.isPresent(),
                         "Worker executor key should not be set along with a number of worker threads");
              checkState(!maxQueuedRequests.isPresent(),
                         "When using a custom executor, handling maximum queued requests must be done manually");
  
              String key = workerExecutorKey.get();
              checkArgument(boundWorkerExecutors.containsKey(key),
                            "No ExecutorService was bound to key '" + key + "'");
              ExecutorService executor = boundWorkerExecutors.get(key);
              checkNotNull(executor, "WorkerExecutorKey maps to null");
              return executor;
          }
          else if (workerExecutor.isPresent()) {
              checkState(!workerThreads.isPresent(),
                         "Worker executor should not be set along with number of worker threads");
              checkState(!maxQueuedRequests.isPresent(),
                         "When using a custom executor, handling maximum queued requests must be done manually");
  
              return workerExecutor.get();
          }
          else {
              return makeDefaultWorkerExecutor();
          }
      }
docs: <p>Builds the {@link java.util.concurrent.ExecutorService} used for running Thrift server methods.</p>
  
  <p>The details of the {@link java.util.concurrent.ExecutorService} that gets built can be tweaked
  by calling any of the following (though only <b>one</b> of these should actually be called):</p>
  
  <ul>
  <li>{@link com.facebook.swift.service.ThriftServerConfig#setWorkerThreads}</li>
  <li>{@link com.facebook.swift.service.ThriftServerConfig#setWorkerExecutor}</li>
  <li>{@link com.facebook.swift.service.ThriftServerConfig#setWorkerExecutorKey}</li>
  </ul>
  
  <p>The default behavior if none of the above were called is to synthesize a fixed-size
  {@link java.util.concurrent.ThreadPoolExecutor} using
  {@link com.facebook.swift.service.ThriftServerConfig#DEFAULT_WORKER_THREAD_COUNT}
  threads.</p>