org.infinispan.commons.api.BasicCacheContainer Maven / Gradle / Ivy
package org.infinispan.commons.api;
import java.util.Set;
/**
* BasicCacheContainer defines the methods used to obtain a {@link org.infinispan.commons.api.BasicCache}.
*
*
* @author Manik Surtani ([email protected])
* @author Galder Zamarreño
* @author [email protected]
* @since 4.0
*/
public interface BasicCacheContainer extends Lifecycle {
/**
* Retrieves the default cache associated with this cache container.
*
*
* @return the default cache.
* @throws org.infinispan.commons.CacheConfigurationException if a default cache does not exist.
*/
BasicCache 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.
*
* @param cacheName name of cache to retrieve
* @return a cache instance identified by cacheName
*/
BasicCache getCache(String cacheName);
/**
* 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.
*
* @return an immutable set of cache names registered in this cache manager.
*/
Set getCacheNames();
}