- All Known Implementing Classes:
DefaultServerCacheManager
public interface SpiCacheManager
The cache service for server side caching of beans and query results.
-
Method Summary
Modifier and TypeMethodDescriptionReturn all the regions.voidClear the caches for the given bean type.voidclearAll()Clear all the caches.voidClear all local caches.voidclearLocal(Class<?> beanType) Clear local caches for the given bean type.getBeanCache(Class<?> beanType) Return the cache for beans of a particular type.getCollectionIdsCache(Class<?> beanType, String propertyName) Return the cache for associated many properties of a bean type.getNaturalKeyCache(Class<?> beanType) Return the cache for mapping natural keys to id values.getQueryCache(Class<?> beanType) Return the cache for query results of a particular type of bean.Return the cache region.booleanReturn true if the L2 caching is local.voidsetAllRegionsEnabled(boolean enabled) Enable or disable all cache regions.voidsetEnabledRegions(String regions) Set the regions that are enabled.voidvisitMetrics(MetricVisitor visitor) Visit and collect the metrics.
-
Method Details
-
visitMetrics
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
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
Return the cache region. We can enable L2 caching by region. -
getNaturalKeyCache
Return the cache for mapping natural keys to id values. -
getBeanCache
Return the cache for beans of a particular type. -
getCollectionIdsCache
Return the cache for associated many properties of a bean type. -
getQueryCache
Return the cache for query results of a particular type of bean. -
clear
Clear the caches for the given bean type. -
clearAll
void clearAll()Clear all the caches. -
clearAllLocal
void clearAllLocal()Clear all local caches. -
clearLocal
Clear local caches for the given bean type.
-