public final class CacheManagerExecutorServiceFactory extends java.lang.Object implements NonstopExecutorServiceFactory
NonstopExecutorServiceFactory
that creates and maintains one per CacheManagerModifier and Type | Field and Description |
---|---|
private static java.lang.String |
EXECUTOR_THREAD_NAME_PREFIX
A string that is a part of the thread name created by the default thread factory.
|
private java.util.Map<java.lang.String,NonstopExecutorService> |
executorServiceMap |
private static CacheManagerExecutorServiceFactory |
SINGLETON |
Modifier | Constructor and Description |
---|---|
private |
CacheManagerExecutorServiceFactory()
private constructor
|
Modifier and Type | Method and Description |
---|---|
static CacheManagerExecutorServiceFactory |
getInstance()
Returns the singleton instance
|
NonstopExecutorService |
getOrCreateNonstopExecutorService(CacheManager cacheManager)
Creates a
NonstopExecutorService and returns it if not already created |
void |
shutdown(CacheManager cacheManager)
Shuts down the
NonstopExecutorService associated with the CacheManager |
private static final java.lang.String EXECUTOR_THREAD_NAME_PREFIX
private static final CacheManagerExecutorServiceFactory SINGLETON
private final java.util.Map<java.lang.String,NonstopExecutorService> executorServiceMap
private CacheManagerExecutorServiceFactory()
public static CacheManagerExecutorServiceFactory getInstance()
public NonstopExecutorService getOrCreateNonstopExecutorService(CacheManager cacheManager)
NonstopExecutorService
and returns it if not already createdgetOrCreateNonstopExecutorService
in interface NonstopExecutorServiceFactory
cacheManager
- the CacheManager
NonstopExecutorService
public void shutdown(CacheManager cacheManager)
NonstopExecutorService
associated with the CacheManager
shutdown
in interface NonstopExecutorServiceFactory