public interface ReferenceIdToKeyCache
The cache can be implemented by any caching library and override the methods to perform
caching operations. Default cache implementation is provided in the library class
CaffeineReferenceIdToKeyCacheImplCaffeineReferenceIdToKeyCacheImpl
.
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String key,
java.lang.String value) |
void |
addAll(java.util.Map<java.lang.String,java.lang.String> idToKeyValues) |
void |
clearCache()
Discards all entries in the cache.
|
boolean |
containsKey(java.lang.String key) |
java.lang.String |
get(java.lang.String key) |
void |
remove(java.lang.String key) |
void add(@Nonnull java.lang.String key, @Nonnull java.lang.String value)
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.void remove(@Nonnull java.lang.String key)
key
- key whose mapping is to be removed from the mapvoid addAll(@Nonnull java.util.Map<java.lang.String,java.lang.String> idToKeyValues)
idToKeyValues
- mappings to be stored in this cache.boolean containsKey(@Nonnull java.lang.String key)
key
- key whose presence in this map is to be testedjava.lang.String get(@Nonnull java.lang.String key)
key
- the key whose associated value is to be returned.null
if the cache contains
no mapping for the key.void clearCache()