/** * @param sender * can be null. */ public static void cleanUpStatics(AbstractGatewaySender sender) { buckToDispatchLock = null; regionToDispatchedKeysMapEmpty = null; regionToDispatchedKeysMap.clear(); synchronized (ParallelGatewaySenderQueue.class) { if (removalThread != null) { removalThread.shutdown(); removalThread = null; } } if (conflationExecutor != null) { cleanupConflationThreadPool(sender); conflationExecutor = null; } }
/** * This method does the cleanup of any threads, sockets, connection that are held up * by the queue. Note that this cleanup doesn't clean the data held by the queue. */ public void cleanUp() { if (this.removalThread != null) { this.removalThread.shutdown(); } if (conflationExecutor != null) { cleanupConflationThreadPool(); } }