@Singleton public class CachingHelperProviderXmlConfig extends Object implements CachingHelperProvider
| Constructor and Description |
|---|
CachingHelperProviderXmlConfig() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeCacheManager()
Close and release the cache resources.
|
protected javax.cache.CacheManager |
getManager() |
<K,V> javax.cache.Cache<K,V> |
getOrCreateCache(String name,
Class<K> keyClass,
Class<V> valueClass,
javax.cache.configuration.Configuration<K,V> config)
Create a cache with the specified configuration.
|
<K,V> javax.cache.Cache<K,V> |
getOrCreateCache(String name,
Class<K> keyClass,
Class<V> valueClass,
javax.cache.expiry.Duration duration)
Create a cache with the specified duration.
|
protected <K,V> javax.cache.Cache<K,V> |
handleGetCache(String name,
Class<K> keyClass,
Class<V> valueClass)
Get the pre-configured cache.
|
public void closeCacheManager()
CachingHelperProvidercloseCacheManager in interface CachingHelperProviderpublic <K,V> javax.cache.Cache<K,V> getOrCreateCache(String name, Class<K> keyClass, Class<V> valueClass, javax.cache.expiry.Duration duration)
CachingHelperProvidergetOrCreateCache in interface CachingHelperProviderK - the cache entry key typeV - the cache entry value valuename - the cache namekeyClass - the key class typevalueClass - the value class typeduration - the cache entry durationpublic <K,V> javax.cache.Cache<K,V> getOrCreateCache(String name, Class<K> keyClass, Class<V> valueClass, javax.cache.configuration.Configuration<K,V> config)
CachingHelperProvidergetOrCreateCache in interface CachingHelperProviderK - the cache entry key typeV - the cache entry value valuename - the cache namekeyClass - the key class typevalueClass - the value class typeconfig - the cache configurationprotected <K,V> javax.cache.Cache<K,V> handleGetCache(String name, Class<K> keyClass, Class<V> valueClass)
K - the cache key typeV - the cache entry typename - the cache namekeyClass - the cache key classvalueClass - the cache entry classprotected final javax.cache.CacheManager getManager()
Copyright © 2019. All rights reserved.