public interface ServerCacheManager
Modifier and Type | Method and Description |
---|---|
List<ServerCacheRegion> |
allRegions()
Return all the cache regions.
|
void |
clear(Class<?> beanType)
This clears both the bean and query cache for a given type.
|
void |
clearAll()
Clear all the caches.
|
void |
clearAllLocal()
Clear all the local caches.
|
void |
clearLocal(Class<?> beanType)
Clear the local caches for this bean type.
|
ServerCache |
getBeanCache(Class<?> beanType)
Return the cache for beans of a particular type.
|
ServerCache |
getCollectionIdsCache(Class<?> beanType,
String propertyName)
Return the cache for associated many properties of a bean type.
|
ServerCache |
getNaturalKeyCache(Class<?> beanType)
Return the cache for mapping natural keys to id values.
|
ServerCache |
getQueryCache(Class<?> beanType)
Return the cache for query results of a particular type of bean.
|
ServerCacheRegion |
getRegion(String name)
Return the cache region by name.
|
boolean |
isLocalL2Caching()
Return true if the L2 caching is local.
|
void |
setAllRegionsEnabled(boolean enabled)
Enable or disable all the cache regions.
|
void |
setEnabledRegions(String regions)
Set the regions that are enabled.
|
void |
visitMetrics(MetricVisitor visitor)
Visit the metrics for all the server caches.
|
void visitMetrics(MetricVisitor visitor)
boolean isLocalL2Caching()
Local L2 caching means that the cache updates should occur in foreground rather than background processing.
List<ServerCacheRegion> allRegions()
void setEnabledRegions(String regions)
Typically this is set on startup and at runtime (via dynamic configuration).
regions
- A region name or comma delimited list of region names.void setAllRegionsEnabled(boolean enabled)
ServerCacheRegion getRegion(String name)
ServerCache getNaturalKeyCache(Class<?> beanType)
ServerCache getBeanCache(Class<?> beanType)
ServerCache getCollectionIdsCache(Class<?> beanType, String propertyName)
ServerCache getQueryCache(Class<?> beanType)
void clearAll()
void clearAllLocal()
This is used when the L2 Cache is based on clustered near-caches (Like Ebean-K8s-L2Cache). It is not used when the L2 cache is a distributed cache such as HazelCast or Ignite etc.
void clearLocal(Class<?> beanType)
This is used when the L2 Cache is based on clustered near-caches (Like Ebean-K8s-L2Cache). It is not used when the L2 cache is a distributed cache such as HazelCast or Ignite etc.
Copyright © 2019. All rights reserved.