public synchronized boolean cancel(Delivery d)
public synchronized void cancel(Delivery d)
   public synchronized boolean cancel(Delivery d)   {      log.info("Delivery " + d + " was cancelled");      if (toBeCancelled == d)      {         toBeCancelled = null;         notifyAll();      }      return true;   }