public class DefaultJCacheUtil extends Object implements JCacheUtil
CacheManager.
 Note that this has limited features and functionality based on the fact that the generic JCache (JSR 107) APIs have limited 
 ability to specify max elements, overflow, etc.| Modifier and Type | Field and Description | 
|---|---|
| protected javax.cache.CacheManager | cacheManager | 
| static URI | JCACHE_MERGED_XML_RESOUCE_URI | 
| Constructor and Description | 
|---|
| DefaultJCacheUtil() | 
| DefaultJCacheUtil(javax.cache.CacheManager cacheManager) | 
| DefaultJCacheUtil(String uri) | 
| DefaultJCacheUtil(URI uri) | 
| Modifier and Type | Method and Description | 
|---|---|
| javax.cache.Cache<Object,Object> | createCache(String cacheName,
           int ttlSeconds,
           int maxElementsInMemory)Returns a new Cache with the appropriate cache name, TTL, and maxElements. | 
| <K,V> javax.cache.Cache<K,V> | createCache(String cacheName,
           int ttlSeconds,
           int maxElementsInMemory,
           Class<K> key,
           Class<V> value)Returns a new Cache with the appropriate cache name, TTL, and maxElements. | 
| protected void | enableManagement(javax.cache.Cache<?,?> cache)By default this disables management of each cache that is created here. | 
| protected void | enableStatistics(javax.cache.Cache<?,?> cache)By default this enables statistics for each cache that is created here. | 
| <K,V> javax.cache.Cache<K,V> | getCache(String cacheName)Returns the cache associated with the name or null if no cache exists. | 
| javax.cache.CacheManager | getCacheManager() | 
public static final URI JCACHE_MERGED_XML_RESOUCE_URI
protected javax.cache.CacheManager cacheManager
public DefaultJCacheUtil()
public DefaultJCacheUtil(javax.cache.CacheManager cacheManager)
public DefaultJCacheUtil(String uri)
public DefaultJCacheUtil(URI uri)
public javax.cache.CacheManager getCacheManager()
getCacheManager in interface JCacheUtilpublic javax.cache.Cache<Object,Object> createCache(String cacheName, int ttlSeconds, int maxElementsInMemory)
JCacheUtilcreateCache in interface JCacheUtilpublic <K,V> javax.cache.Cache<K,V> createCache(String cacheName, int ttlSeconds, int maxElementsInMemory, Class<K> key, Class<V> value)
JCacheUtilcreateCache in interface JCacheUtilpublic <K,V> javax.cache.Cache<K,V> getCache(String cacheName)
JCacheUtilgetCache in interface JCacheUtilprotected void enableManagement(javax.cache.Cache<?,?> cache)
cache - protected void enableStatistics(javax.cache.Cache<?,?> cache)
cache - Copyright © 2020. All rights reserved.