code: public <T> T invokeWithClientSession(int targetPlayer, ClientTask<T> task, String description)
              throws Exception {
          if (!isRunning()) {
              throw new IllegalStateException("ConnectionManager is not running, aborting " + description);
          }
  
          final Client client = allocateClient(targetPlayer, description);
          try {
              return task.useClient(client);
          } finally {
              freeClient(client);
          }
      }
docs: Obtain a dbserver client session that can be used to perform some task, call that task with the client,
  then release the client.
  
  @param targetPlayer the player number whose dbserver we wish to communicate with
  @param task the activity that will be performed with exclusive access to a dbserver connection
  @param description a short description of the task being performed for error reporting if it fails,
  should be a verb phrase like "requesting track metadata"
  @param <T> the type that will be returned by the task to be performed
  
  @return the value returned by the completed task
  
  @throws IOException if there is a problem communicating
  @throws Exception from the underlying {@code task}, if any