public interface CacheFacade
A facade used for managing and accessing Cache instances.
Type Params | Return Type | Name and description |
---|---|---|
|
public boolean |
cacheExists(java.lang.String cacheName) |
|
public void |
clearAllCaches() |
|
public void |
clearCachesByPrefix(java.lang.String prefix) |
|
public javax.cache.Cache |
getCache(java.lang.String cacheName) Get the named Cache, creating one based on configuration and defaults if none exists. |
<K, V> |
public javax.cache.Cache<K, V> |
getCache(java.lang.String cacheName, java.lang.Class<K> keyType, java.lang.Class<V> valueType) A type-safe variation on getCache for configured caches. |
|
public java.util.Set<java.lang.String> |
getCacheNames() |
|
public javax.cache.Cache |
getDistributedCache(java.lang.String cacheName) Get the named distributed Cache, creating one based on configuration and defaults if none exists. |
|
public MCache |
getLocalCache(java.lang.String cacheName) Get the named local Cache (MCache instance), creating one based on defaults if none exists. |
|
public void |
registerCache(javax.cache.Cache cache) Register an externally created cache for future gets, inclusion in cache management tools, etc. |
Get the named Cache, creating one based on configuration and defaults if none exists. Defaults to local cache if no configuration found.
A type-safe variation on getCache for configured caches.
Get the named distributed Cache, creating one based on configuration and defaults if none exists. If the cache is configured without type != 'distributed' this will return an error.
Get the named local Cache (MCache instance), creating one based on defaults if none exists. If the cache is configured with type != 'local' this will return an error.
Register an externally created cache for future gets, inclusion in cache management tools, etc. If a cache with the same name exists the call will be ignored (ie like putIfAbsent).