Interface BasicCacheContainer

All Superinterfaces:
Lifecycle
All Known Subinterfaces:
CacheContainer, EmbeddedCacheManager, RemoteCacheContainer
All Known Implementing Classes:
AbstractDelegatingEmbeddedCacheManager, DefaultCacheManager, RemoteCacheManager

public interface BasicCacheContainer extends Lifecycle
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 Type
    Method
    Description
    <K, V> BasicCache<K,V>
    Retrieves the default cache associated with this cache container.
    <K, V> BasicCache<K,V>
    getCache(String cacheName)
    Retrieves a cache by name.
    This method returns a collection of all cache names.

    Methods inherited from interface org.infinispan.commons.api.Lifecycle

    start, stop
  • Method Details

    • getCache

      <K, V> BasicCache<K,V> getCache()
      Retrieves the default cache associated with this cache container.

      Returns:
      the default cache.
      Throws:
      CacheConfigurationException - if a default cache does not exist.
    • getCache

      <K, V> BasicCache<K,V> getCache(String cacheName)
      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

      Set<String> 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.