public class SoftCache<K,V> extends Object implements Iterable<Map.Entry<K,V>>, Serializable
Constructor and Description |
---|
SoftCache() |
SoftCache(boolean useHit) |
SoftCache(Map<K,V> m) |
SoftCache(Map<K,V> m,
boolean useHit) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
static <K,V> SoftCache<K,V> |
create() |
static <K,V> SoftCache<K,V> |
create(boolean useHit) |
static <K,V> SoftCache<K,V> |
create(Map<K,V> m) |
static <K,V> SoftCache<K,V> |
create(Map<K,V> m,
boolean useHit) |
void |
forEach(Consumer<? super Map.Entry<K,V>> action) |
V |
get(K key) |
V |
get(K key,
V def) |
long |
getCounts() |
long |
getHits() |
double |
getHitsRate() |
Iterator<Map.Entry<K,V>> |
iterator() |
V |
put(K key,
V value) |
V |
remove(K key) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
spliterator
public static <K,V> SoftCache<K,V> create()
public static <K,V> SoftCache<K,V> create(boolean useHit)
public void clear()
public long getCounts()
public long getHits()
public double getHitsRate()
Copyright © 2024. All rights reserved.