if (log.isTraceEnabled()) { log.trace(this + " can't find delivery " + del + " in state so not replacing messsage ref"); }
if (trace) { log.trace(this + " can't find delivery " + del + " in state so not replacing messsage ref"); }
   public void cancelDelivery(Delivery del) throws Throwable   {      if (log.isTraceEnabled()) { log.trace(this + " cancelling " + del + " in memory"); }            boolean removed = deliveries.remove(del);            if (!removed)      {         //This is ok         //This can happen if the message is cancelled before the result of ServerConsumerDelegate.handle         //has returned, in which case we won't have a record of the delivery in the Set                  //In this case we don't want to add the message reference back into the state         //since it was never removed in the first place                  if (log.isTraceEnabled()) { log.trace(this + " can't find delivery " + del + " in state so not replacing messsage ref"); }      }      else      {                  messageRefs.addFirst(del.getReference(), del.getReference().getPriority());         if (log.isTraceEnabled()) { log.trace(this + " added " + del.getReference() + " back into state"); }      }   }