code: public void close(K key) {
  
          LettuceAssert.notNull(key, "ConnectionKey must not be null!");
  
          Sync<K, T, F> sync = connections.get(key);
          if (sync != null) {
              connections.remove(key);
              sync.doWithConnection(AsyncCloseable::closeAsync);
          }
      }
docs: Close a connection by its connection {@code key}. Pending connections are closed using future chaining.
  
  @param key the connection {@code key}, must not be {@literal null}.