K - The type of the key.V - The type of the value.public class InMemoryCache<K,V> extends Object implements Cache<K,V>
WeakHashMap.| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(K key) |
static <expectedK,expectedV> |
create()
Create a new instance for a cache in memory.
|
Optional<V> |
get(K key) |
boolean |
isEmpty() |
void |
put(K key,
V value) |
void |
remove(K key) |
void |
removeAll() |
long |
size() |
CacheStats |
stats() |
public static <expectedK,expectedV> InMemoryCache<expectedK,expectedV> create()
expectedK - The expected type for the key.expectedV - The expected type for the value.InMemoryCache.public CacheStats stats()
Copyright © 2007–2024. All rights reserved.