public interface MultipleObjectCacheManager
| 限定符和类型 | 方法和说明 |
|---|---|
int |
capacity(Object key)
Return the current capacity of the cache, it should basically be (max size - current size).
|
void |
flush(Object key)
Let the object cache be flushed.
|
boolean |
isEmpty(Object key) |
void |
merge(Object key,
ObjectCache cache)
Merge the current cache with another.
|
void |
putAll(Object key,
Map map)
Add all the entries in the Map to cache.
|
void |
resize(Object key,
int size)
Resize the cache to a particular size, if the size is actually bigger than the
current size then this operation should not touch the cached objects, if the size is
less then the cache should be reduced in size using the current policy until the
size is reached.
|
void |
setMaxSize(Object key,
int size)
Set the maximum size of the cache.
|
void |
setPolicy(Object key,
int policy) |
void |
toMap(Object object,
Map map) |
void flush(Object key)
key - The key to identify the particular cache.void setMaxSize(Object key, int size)
key - The key to identify the particular cache.size - The maximum size.void resize(Object key, int size)
key - The key to identify the particular cache.size - The new size.int capacity(Object key)
key - The key to identify the particular cache.boolean isEmpty(Object key)
void merge(Object key, ObjectCache cache)
key - The key to identify the particular cache.cache - The cache to merge.void putAll(Object key, Map map)
key - The key to identify the particular cache.map - The Map to get key/values from.void setPolicy(Object key, int policy)
Copyright © 2021. All rights reserved.