Interface CacheContainer

All Superinterfaces:
BasicCacheContainer, Lifecycle
All Known Subinterfaces:
EmbeddedCacheManager
All Known Implementing Classes:
AbstractDelegatingEmbeddedCacheManager, DefaultCacheManager, InternalCacheManager

public interface CacheContainer extends BasicCacheContainer
  • Method Summary

    Modifier and Type
    Method
    Description
    default CacheContainerAdmin<?,?>
    Provides access to administrative methods which affect the underlying cache container, such as cache creation and removal.
    <K, V> Cache<K,V>
    Retrieves the default cache associated with this cache container.
    <K, V> Cache<K,V>
    getCache(String cacheName)
    Retrieves a cache by name.

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

    getCacheNames

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

    start, stop
  • Method Details

    • getCache

      <K, V> Cache<K,V> getCache()
      Description copied from interface: BasicCacheContainer
      Retrieves the default cache associated with this cache container.

      Specified by:
      getCache in interface BasicCacheContainer
      Returns:
      the default cache.
    • getCache

      <K, V> Cache<K,V> getCache(String cacheName)
      Description copied from interface: BasicCacheContainer
      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.

      Specified by:
      getCache in interface BasicCacheContainer
      Parameters:
      cacheName - name of cache to retrieve
      Returns:
      a cache instance identified by cacheName
    • administration

      default CacheContainerAdmin<?,?> administration()
      Provides access to administrative methods which affect the underlying cache container, such as cache creation and removal. If the underlying container is clustered or remote, the operations will affect all nodes.