/** * Stop the coordinator and all the internal data structures. * <p/> * This stops as quickly as possible without losing any previously added items. However, no guarantees are made * towards the processing of these items. It's highly likely that items are still inside the internal buckets and not * processed. * * @see #start(ItemProcessor, int, ScatterPolicy) */ public void stop() { group.stop(); coordinatorWriteLock.lock(); try { if (null == localBuckets) { LOGGER.fine("AsyncCoordinator already stopped"); return; } localBuckets = null; scatterPolicy = null; UNFLUSHABLE_STATE.remove(this); } finally { coordinatorWriteLock.unlock(); } }
/** * Stop the coordinator and all the internal data structures. * <p/> * This stops as quickly as possible without losing any previously added items. However, no guarantees are made * towards the processing of these items. It's highly likely that items are still inside the internal buckets and not * processed. * * @see #start(ItemProcessor, int, ScatterPolicy) */ public void stop() { group.stop(); coordinatorWriteLock.lock(); try { if (null == localBuckets) { LOGGER.fine("AsyncCoordinator already stopped"); return; } localBuckets = null; scatterPolicy = null; UNFLUSHABLE_STATE.remove(this); } finally { coordinatorWriteLock.unlock(); } }
/** * Stop the coordinator and all the internal data structures. * <p/> * This stops as quickly as possible without losing any previously added items. However, no guarantees are made * towards the processing of these items. It's highly likely that items are still inside the internal buckets and not * processed. * * @see #start(ItemProcessor, int, ScatterPolicy) */ public void stop() { group.stop(); coordinatorWriteLock.lock(); try { if (null == localBuckets) { LOGGER.fine("AsyncCoordinator already stopped"); return; } localBuckets = null; scatterPolicy = null; UNFLUSHABLE_STATE.remove(this); } finally { coordinatorWriteLock.unlock(); } }