class ThrottledForwardingExecutor implements Executor {

  @Override
  public void execute(Runnable command) {
    if (availableSlots.tryAcquire()) {
      try {
        executor.execute(
            () -> {
              command.run();
              availableSlots.release();
            });
      } catch (RejectedExecutionException e) {
        command.run();
      }
    } else {
      command.run();
    }
  }

    ThrottledForwardingExecutor(int maximumConcurrency, Executor executor);

}