public class JSR107Cache<K,V> extends Object implements Cache<K,V>, ConfigurableImplementation, ShutdownHook
CACHE_EXPIRY_DURATION, CACHE_EXPIRY_TYPE, CACHE_NAME
Constructor and Description |
---|
JSR107Cache() |
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 |
initialize(Map<String,Object> parameterMap)
initializes the implementation with additional parameters.
|
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> map) |
void |
remove(K key)
Removes the mapping for a key from the cache if it is present.
|
void |
shutdown() |
public void initialize(Map<String,Object> parameterMap) throws TechnicalConnectorException
ConfigurableImplementation
initialize
in interface ConfigurableImplementation
parameterMap
- Map with for each propertyString ,the input parameter as Object.TechnicalConnectorException
- if the parameterMap is not correct.public String getName()
Cache
public V get(K key)
Cache
null
is returned.public boolean containsKey(K key)
Cache
containsKey
in interface Cache<K,V>
key
- key which association should be checkedtrue
, if this cache contains a mapping for the specified keypublic void put(K key, V value)
Cache
public void remove(K key)
Cache
public void clear()
Cache
public void shutdown()
shutdown
in interface ShutdownHook
Connector Packaging TECHNICAL 4.1.2 API
Copyright © {inceptionYear}-2022 eHealth. All Rights Reserved.