Esempio n. 1
0
 /**
  * Remove an active operation.
  *
  * @param id the operation id
  * @return the removed active operation, {@code null} if there was no registered operation
  */
 private ActiveOperation<T, A> removeActiveOperation(final Integer id) {
   lock.lock();
   try {
     final ActiveOperation<T, A> removed = activeRequests.remove(id);
     if (removed != null) {
       activeCount--;
       operationIdManager.freeBatchId(id);
       condition.signalAll();
     }
     return removed;
   } finally {
     lock.unlock();
   }
 }