@ThreadSafe
public class MemorySafeWindowTinyLFUMap<K,V>
extends java.util.AbstractMap<K,V>
implements java.io.Serializable
MemorySafeLRUMap
is that this class is thread safe, and it use WindowTinyLFU algorithm
provided by caffeine which is better than LRU algorithm.| Constructor and Description |
|---|
MemorySafeWindowTinyLFUMap(int maxFreeMemory,
int initialSize) |
MemorySafeWindowTinyLFUMap(int maxFreeMemory,
int initialSize,
long expireAfterWrite,
long maximumSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp()
clean invalidated cache now.
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
V |
get(java.lang.Object key) |
int |
hashCode() |
void |
invalidate()
invalidate coldest cache now.
|
boolean |
isFull()
whether to full.
|
V |
put(K key,
V value) |
V |
remove(java.lang.Object key) |
clear, clone, containsKey, containsValue, isEmpty, keySet, putAll, size, toString, valuespublic MemorySafeWindowTinyLFUMap(int maxFreeMemory,
int initialSize)
public MemorySafeWindowTinyLFUMap(int maxFreeMemory,
int initialSize,
long expireAfterWrite,
long maximumSize)
public V get(java.lang.Object key)
public V remove(java.lang.Object key)
public void cleanUp()
public void invalidate()
public boolean isFull()
public boolean equals(java.lang.Object o)
Copyright © 2024 The Apache Software Foundation. All rights reserved.