Cacheable.Entry<V>| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all of the mappings from this map (optional operation).
|
Set<Map.Entry<K,Cacheable.Entry<V>>> |
entrySet() |
V |
get(K key)
Returns the value to which the specified key is cached,
or
null if this cache contains no mapping for the key. |
Cacheable.Entry<V> |
getEntry(K key)
Returns a
Cacheable.Entry view of the mappings contained in this cache. |
static <K,V> Cacheable<K,V> |
getInstance() |
String |
getName()
cache name
|
CachePolicy |
getPolicy()
policy that maintenance the capacity and expire time of data
|
V |
put(K key,
V object)
Associates the specified value with the specified key in this cache
If the cache previously contained a mapping for the key, the old value
is replaced by the specified value.
|
Cacheable.Entry<V> |
remove(K key) |
void |
setPolicy(CachePolicy policy)
Policy to control the cache data
|
long |
size()
Returns the number of key-value mappings in this map.
|
public static <K,V> Cacheable<K,V> getInstance()
public CachePolicy getPolicy()
Cacheablepublic void setPolicy(CachePolicy policy)
Cacheablepublic V put(K key, V object)
Cacheablepublic V get(K key)
Cacheablenull if this cache contains no mapping for the key.public Cacheable.Entry<V> getEntry(K key)
CacheableCacheable.Entry view of the mappings contained in this cache.getEntry in interface Cacheable<K,V>key - the key whose associated with entry is to be returnedCacheable.Entry contained in this cache, or
null if this map contains no mapping for the keypublic void clear()
CacheableCopyright © 2012–2020 jkniv, copyleft code. All rights reserved.