public interface Cache<K,V>
Modifier and Type | Field and Description |
---|---|
static String |
CACHE_EXPIRY_DURATION |
static String |
CACHE_EXPIRY_TYPE |
static String |
CACHE_NAME |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the cache.
|
boolean |
containsKey(K key)
Returns true, if there is a mapping for the specified key.
|
V |
get(K key)
Returns a value associated by the given key, that contains a non expired value.
|
String |
getName()
A configured or generated name of this cache instance.
|
void |
put(K key,
V value)
Updates an existing cache entry for the specified key, so it associates the given value, or, insert a new cache entry for this key
and value.
|
void |
putAll(Map<K,V> keystores) |
void |
remove(K key)
Removes the mapping for a key from the cache if it is present.
|
static final String CACHE_NAME
static final String CACHE_EXPIRY_TYPE
static final String CACHE_EXPIRY_DURATION
String getName()
V get(K key)
null
is returned.key
- key with which the specified value is associatednull
if there was no mapping for the key.boolean containsKey(K key)
key
- key which association should be checkedtrue
, if this cache contains a mapping for the specified keyvoid put(K key, V value)
key
- key with which the specified value is associatedvalue
- value to be associated with the specified keyvoid remove(K key)
key
- key which mapping is to be removed from the cache, not nullvoid clear()
Connector Packaging TECHNICAL 4.0.2 API
Copyright © {inceptionYear}-2021 eHealth. All Rights Reserved.