Package org.kingdoms.utils.cache
Class JavaMapWrapper<K,V>
java.lang.Object
org.kingdoms.utils.cache.JavaMapWrapper<K,V>
- All Implemented Interfaces:
Map<K,,V> PeekableMap<K,V>
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionJavaMapWrapper(ConcurrentHashMap<K, V> cache, com.github.benmanes.caffeine.cache.CacheLoader<K, V> loader) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()getIfPresent(K key) booleanisEmpty()keySet()voidintsize()@NotNull Collection<V>values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
JavaMapWrapper
public JavaMapWrapper(ConcurrentHashMap<K, V> cache, com.github.benmanes.caffeine.cache.CacheLoader<K, V> loader)
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
peek
- Specified by:
peekin interfacePeekableMap<K,V>
-
getIfPresent
- Specified by:
getIfPresentin interfacePeekableMap<K,V>
-