Interface SpiCacheManager

All Known Implementing Classes:
DefaultServerCacheManager

public interface SpiCacheManager
The cache service for server side caching of beans and query results.
  • Method Details

    • visitMetrics

      void visitMetrics(MetricVisitor visitor)
      Visit and collect the metrics.
    • isLocalL2Caching

      boolean isLocalL2Caching()
      Return true if the L2 caching is local.

      Local L2 caching means that the cache updates should occur in foreground rather than background processing.

    • allRegions

      List<ServerCacheRegion> allRegions()
      Return all the regions.
    • setEnabledRegions

      void setEnabledRegions(String regions)
      Set the regions that are enabled.
      Parameters:
      regions - A single region name or a comma delimited list of region names.
    • setAllRegionsEnabled

      void setAllRegionsEnabled(boolean enabled)
      Enable or disable all cache regions.
    • getRegion

      SpiCacheRegion getRegion(String region)
      Return the cache region. We can enable L2 caching by region.
    • getNaturalKeyCache

      ServerCache getNaturalKeyCache(Class<?> beanType)
      Return the cache for mapping natural keys to id values.
    • getBeanCache

      ServerCache getBeanCache(Class<?> beanType)
      Return the cache for beans of a particular type.
    • getCollectionIdsCache

      ServerCache getCollectionIdsCache(Class<?> beanType, String propertyName)
      Return the cache for associated many properties of a bean type.
    • getQueryCache

      ServerCache getQueryCache(Class<?> beanType)
      Return the cache for query results of a particular type of bean.
    • clear

      void clear(Class<?> beanType)
      Clear the caches for the given bean type.
    • clearAll

      void clearAll()
      Clear all the caches.
    • clearAllLocal

      void clearAllLocal()
      Clear all local caches.
    • clearLocal

      void clearLocal(Class<?> beanType)
      Clear local caches for the given bean type.