Package org.dataloader.impl
Class DefaultCacheMap<K,V>
java.lang.Object
org.dataloader.impl.DefaultCacheMap<K,V>
- Type Parameters:
K
- type parameter indicating the type of the cache keysV
- type parameter indicating the type of the data that is cached
- All Implemented Interfaces:
CacheMap<K,
V>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclear()
Clears all entries of the cache mapboolean
containsKey
(K key) Checks whether the specified key is contained in the cache map.Deletes the entry with the specified key from the cache map, if it exists.Gets the specified key from the cache map.getAll()
Gets a collection of CompletableFutures from the cache map.set
(K key, CompletableFuture<V> value) Creates a new cache map entry with the specified key and value, or updates the value if the key already exists.
-
Constructor Details
-
DefaultCacheMap
public DefaultCacheMap()Default constructor
-
-
Method Details
-
containsKey
Checks whether the specified key is contained in the cache map.- Specified by:
containsKey
in interfaceCacheMap<K,
V> - Parameters:
key
- the key to check- Returns:
true
if the cache contains the key,false
otherwise
-
get
Gets the specified key from the cache map.May throw an exception if the key does not exist, depending on the cache map implementation that is used.
-
getAll
Gets a collection of CompletableFutures from the cache map. -
set
Creates a new cache map entry with the specified key and value, or updates the value if the key already exists. -
delete
Deletes the entry with the specified key from the cache map, if it exists. -
clear
Clears all entries of the cache map
-