code: public synchronized void setDelegate(Future<V> delegate) {
          if (delegateHolder.isCancelled()) {
              delegate.cancel(mayInterruptWhenCancellingDelegate);
          } else {
              this.delegate = delegate;
              delegateHolder.complete(delegate);
          }
      }
docs: Set the Future to delegate calls to
  
  @param delegate the delegate future