/** * Done with the recording processing, finish processing the outstanding {@link ExecutionRecord} * publication and shutdowns the processing queue. * * @throws InterruptedException */ void finish() throws InterruptedException { workQueue.shutdown(); }
@Override public synchronized void end(int key) throws InterruptedException { long startTime = System.currentTimeMillis(); try { waitForAll(key); mOutstandingJobs.get(key).clear(); mLogger.verbose("Job finished in %1$d", System.currentTimeMillis() - startTime); } finally { // even if we have failures, we need to shutdown property the sub processes. if (refCount.decrementAndGet() == 0) { mCrunchingRequests.shutdown(); mLogger.verbose("Shutdown finished in %1$d", System.currentTimeMillis() - startTime); } } } }
@Override public synchronized void end(int key) throws InterruptedException { long startTime = System.currentTimeMillis(); try { waitForAll(key); mOutstandingJobs.get(key).clear(); mLogger.verbose("Job finished in %1$d", System.currentTimeMillis() - startTime); } finally { // even if we have failures, we need to shutdown property the sub processes. if (refCount.decrementAndGet() == 0) { try { mCrunchingRequests.shutdown(); } catch(InterruptedException e) { Thread.interrupted(); mLogger.warning("Error while shutting down crunching queue : %s", e.getMessage()); } mLogger.verbose("Shutdown finished in %1$d", System.currentTimeMillis() - startTime); } } } }