|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<CacheManagerFactory>
javax.cache.CacheManagerFactory
public enum CacheManagerFactory
A factory for creating CacheManagers using the SPI conventions in the JDK's ServiceLoader
For a provider to be discovered by the CacheManagerFactory, it's jar must contain a resource
called:
META-INF/services/javax.cache.spi.CacheManagerFactoryProvidercontaining the class name implementing
CacheManagerFactoryProvider
e.g. For the reference implementation:
"javax.cache.implementation.RIServiceFactory"
The CacheManagerFactory also keeps track of all CacheManagers created by the factory. Subsequent calls
to getCacheManager() return the same CacheManager.
ServiceLoader,
CacheManagerFactoryProvider| Enum Constant Summary | |
|---|---|
INSTANCE
The singleton instance using the Joshua Bloc enum-based singleton pattern. |
|
| Field Summary | |
|---|---|
static String |
DEFAULT_CACHE_MANAGER_NAME
The name of the default cache manager. |
| Method Summary | |
|---|---|
CacheManager |
getCacheManager()
Get the default cache manager. |
CacheManager |
getCacheManager(String name)
Get a named cache manager. |
static CacheManagerFactory |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static CacheManagerFactory[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final CacheManagerFactory INSTANCE
| Field Detail |
|---|
public static final String DEFAULT_CACHE_MANAGER_NAME
getCacheManager() is invoked.
The default CacheManager is always created.
| Method Detail |
|---|
public static CacheManagerFactory[] values()
for (CacheManagerFactory c : CacheManagerFactory.values()) System.out.println(c);
public static CacheManagerFactory valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic CacheManager getCacheManager()
DEFAULT_CACHE_MANAGER_NAME
IllegalStateException - if no CacheManagerFactoryProvider was foundpublic CacheManager getCacheManager(String name)
name - the name of this cache manager
NullPointerException - if name is null
IllegalStateException - if no CacheManagerFactoryProvider was found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||