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
ConfigurableImplementationinitialize in interface ConfigurableImplementationparameterMap - Map with for each propertyString ,the input parameter as Object.TechnicalConnectorException - if the parameterMap is not correct.public String getName()
Cachepublic V get(K key)
Cachenull is returned.public boolean containsKey(K key)
CachecontainsKey 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)
Cachepublic void remove(K key)
Cachepublic void clear()
Cachepublic void shutdown()
shutdown in interface ShutdownHook
Connector Packaging generic 4.3.0 API
Copyright © {inceptionYear}-2023 eHealth. All Rights Reserved.