code: public WindowFuture<K,R,P> cancel(K key) throws InterruptedException {
          if (!this.futures.containsKey(key)) {
              return null;
          }
  
          this.lock.lockInterruptibly();
          try {
              // try to remove future from window
              DefaultWindowFuture<K,R,P> future = this.futures.remove(key);
              if (future == null) {
                  return null;
              }
              
              // set failed using helper method (bypasses signalAll and requests.remove(key))
              future.cancelHelper(System.currentTimeMillis());
  
              // signal that a future is completed
              this.completedCondition.signalAll();
  
              return future;
          } finally {
              this.lock.unlock();
          }
      }
docs: Cancels (completes) a request. Any callers/threads waiting for completion
  will be signaled. Also, since this frees up a slot in the window, one
  caller/thread blocked with a pending offer will be signaled to continue.
  @param key The key for the original request
  @return A future representing the entire operation.
  @throws InterruptedException Thrown if the calling thread is interrupted
  and we're currently waiting to acquire the internal "windowLock".