Ejemplo n.º 1
0
 /**
  * Cancels pending tasks for given repository.
  *
  * @param context request context
  * @param uuid repository uuid
  * @return <code>true</code> if has been canceled properly
  */
 public boolean cancel(RequestContext context, String uuid) {
   LOGGER.log(Level.FINER, "[SYNCHRONIZER] Canceled resource: {0}", uuid);
   // drop resource already being harvested
   boolean dropped = pool != null ? pool.drop(uuid) : false;
   // withdraw from the queue
   boolean canceled = taskQueue != null ? taskQueue.cancel(context, uuid) : false;
   // exit with status
   return canceled || dropped;
 }