|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.pool.ReferenceCountingExecutorService
public class ReferenceCountingExecutorService
We share the executor service among several PoolingFilters. This class reference counts how many filter chains are using the executor service and destroys the service, thus freeing up its threads, when the count reaches zero. It recreates the service when the count is incremented. This is particularly important on the client where failing to destroy the executor service prevents the JVM from shutting down due to the existence of non-daemon threads.
Method Summary | |
---|---|
static ReferenceCountingExecutorService |
getInstance()
|
java.util.concurrent.ExecutorService |
getPool()
The filters that use the executor service should call this method to get access to the service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ReferenceCountingExecutorService getInstance()
public java.util.concurrent.ExecutorService getPool()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |