public interface Cache<K,V>
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
clear cache
|
boolean |
containsKey(K key)
whether key is in cache
|
Set<Map.Entry<K,CacheObject<V>>> |
entrySet()
key value set
|
CacheObject<V> |
get(K key)
get object
|
double |
getHitRate()
get hit rate
|
int |
getSize()
get object in cache
|
Set<K> |
keySet()
key set
|
CacheObject<V> |
put(K key,
CacheObject<V> value)
put object
|
CacheObject<V> |
put(K key,
V value)
put object
|
void |
putAll(Cache<K,V> cache2)
put all object in cache2
|
CacheObject<V> |
remove(K key)
remove object
|
Collection<CacheObject<V>> |
values()
value set
|
int getSize()
CacheObject<V> get(K key)
key - CacheObject<V> put(K key, V value)
key - keyvalue - data in object, CacheObject.getData()CacheObject<V> put(K key, CacheObject<V> value)
key - keyvalue - objectboolean containsKey(K key)
key - CacheObject<V> remove(K key)
key - void clear()
double getHitRate()
Set<Map.Entry<K,CacheObject<V>>> entrySet()
Collection<CacheObject<V>> values()
Copyright © 2012-2014. All Rights Reserved.