K - key typeV - value typepublic interface Cache<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp()
Cleanup cache.
|
Collection<V> |
get(Iterable<? extends K> keys)
Get values by
keys. |
V |
get(K key)
Get value by
key from cache. |
Collection<V> |
getAll()
Get all values from cache.
|
Map<K,V> |
getAllAsMap()
Get all values from cache as
Map. |
void |
invalidate(Iterable<? extends K> keys)
Invalidate values by
keys. |
void |
invalidate(K key)
Invalidate element in cache by
key. |
void |
invalidateAll()
Invalidate all values in cache.
|
boolean |
isEmpty()
Is empty.
|
void |
put(K key,
V value)
Put
value by key to cache. |
void |
put(Map<K,V> elements)
Put
elements to cache. |
long |
size()
Get cache size.
|
void invalidate(K key)
key.key - keyCollection<V> get(Iterable<? extends K> keys)
keys.Collection<V> getAll()
List with valuesvoid put(Map<K,V> elements)
elements to cache.elements - Map with key/value to cachevoid invalidate(Iterable<? extends K> keys)
keys.keys - Iterablevoid invalidateAll()
long size()
void cleanUp()
boolean isEmpty()
Copyright © 2013–2019 BB Corp. All rights reserved.