Interface CacheManager
-
public interface CacheManager
Manage a Cache.Allows to change policy settings at run-time.
Intentionally does NOT give direct programmatic access to the
Cache
.Implementations of this interface are expected to be thread-safe.
- Author:
- Michael Vorburger.ch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
evictAll()
Evict ALL entries from this Cache.BaseCacheConfig
getConfig()
Get this Cache's (fixed) configuration.CachePolicy
getPolicy()
Get this Cache's current policy.CacheStats
getStats()
Get this Cache's latest statistics.void
setPolicy(CachePolicy newPolicy)
Update this Cache's policy.
-
-
-
Method Detail
-
getConfig
BaseCacheConfig getConfig()
Get this Cache's (fixed) configuration.
-
getStats
CacheStats getStats()
Get this Cache's latest statistics. This may return dummy/empty 0 stats, if the the Cache does not haveCachePolicy.statsEnabled()
.
-
getPolicy
CachePolicy getPolicy()
Get this Cache's current policy.
-
setPolicy
void setPolicy(CachePolicy newPolicy)
Update this Cache's policy.
-
evictAll
void evictAll()
Evict ALL entries from this Cache.Use
BaseCache.evict(Object)
to evict a single entry.
-
-