public class CacheManager extends Object implements CacheAccessListener
| Modifier and Type | Class and Description |
|---|---|
static class |
CacheManager.CacheInfo
Internal copy of the cache information.
|
ACCESS_INTERVAL| Constructor and Description |
|---|
CacheManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Cache cache)
Add a new cache to the list.
|
void |
cacheAccessed(long accessCount)
After one of the caches is accessed a number of times, this method is called.
|
void |
disposeCache(Cache cache)
Called after the cache is no longer used.
|
long |
getMaxMemory() |
long |
getMaxMemoryPerCache() |
long |
getMinMemoryPerCache() |
long |
getMinResizeInterval() |
void |
remove(Cache cache)
Remove a cache.
|
void |
setMaxMemory(long maxMemory) |
void |
setMaxMemoryPerCache(long maxMemoryPerCache) |
void |
setMinMemoryPerCache(long minMemoryPerCache) |
void |
setMinResizeInterval(long minResizeInterval) |
public long getMaxMemory()
public void setMaxMemory(long maxMemory)
public long getMaxMemoryPerCache()
public void setMaxMemoryPerCache(long maxMemoryPerCache)
public long getMinMemoryPerCache()
public void setMinMemoryPerCache(long minMemoryPerCache)
public long getMinResizeInterval()
public void setMinResizeInterval(long minResizeInterval)
public void cacheAccessed(long accessCount)
cacheAccessed in interface CacheAccessListeneraccessCount - number of cache accesses since the last callpublic void add(Cache cache)
cache - the cache to addpublic void remove(Cache cache)
cache - the cache to removepublic void disposeCache(Cache cache)
CacheAccessListenerdisposeCache in interface CacheAccessListenerCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.