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()
Cacheable
public void setPolicy(CachePolicy policy)
Cacheable
public V put(K key, V object)
Cacheable
public V get(K key)
Cacheable
null
if this cache contains no mapping for the key.public Cacheable.Entry<V> getEntry(K key)
Cacheable
Cacheable.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()
Cacheable
Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.