code: public void cancel(ScheduledFuture<?> scheduledFuture) {
          clear();
          if (scheduledFuture != null && !scheduledFuture.isDone()) {
              scheduledFuture.cancel(false);
          }
      }
docs: Cancel the scheduled command.
  
  @param scheduledFuture the scheduled future used to schedule the command.