Package org.infinispan.commons.api
Interface BasicCacheContainer
- All Superinterfaces:
Lifecycle
- All Known Subinterfaces:
CacheContainer
,EmbeddedCacheManager
,RemoteCacheContainer
- All Known Implementing Classes:
AbstractDelegatingEmbeddedCacheManager
,DefaultCacheManager
,InternalCacheManager
,RemoteCacheManager
BasicCacheContainer defines the methods used to obtain a
BasicCache
.
- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org), Galder ZamarreƱo, Mircea.Markus@jboss.com
-
Method Summary
Modifier and TypeMethodDescription<K,
V> BasicCache <K, V> getCache()
Retrieves the default cache associated with this cache container.<K,
V> BasicCache <K, V> Retrieves a cache by name.This method returns a collection of all cache names.
-
Method Details
-
getCache
Retrieves the default cache associated with this cache container.- Returns:
- the default cache.
- Throws:
CacheConfigurationException
- if a default cache does not exist.
-
getCache
Retrieves a cache by name. If the cache has been previously created with the same name, the running cache instance is returned. Otherwise, this method attempts to create the cache first.- Parameters:
cacheName
- name of cache to retrieve- Returns:
- a cache instance identified by cacheName
-
getCacheNames
This method returns a collection of all cache names. The configurations may have been defined via XML, in the programmatic configuration, or at runtime. Internal-only caches are not included.- Returns:
- an immutable set of cache names registered in this cache manager.
-