Interface SpiCacheManager
- All Known Implementing Classes:
DefaultServerCacheManager
public interface SpiCacheManager
The cache service for server side caching of beans and query results.
-
Method Summary
Modifier and TypeMethodDescriptionList<io.ebean.cache.ServerCacheRegion> Return 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.io.ebean.cache.ServerCachegetBeanCache(Class<?> beanType) Return the cache for beans of a particular type.io.ebean.cache.ServerCachegetCollectionIdsCache(Class<?> beanType, String propertyName) Return the cache for associated many properties of a bean type.io.ebean.cache.ServerCachegetNaturalKeyCache(Class<?> beanType) Return the cache for mapping natural keys to id values.io.ebean.cache.ServerCachegetQueryCache(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(io.ebean.meta.MetricVisitor visitor) Visit and collect the metrics.
-
Method Details
-
visitMetrics
void visitMetrics(io.ebean.meta.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<io.ebean.cache.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
-
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.
-