Modifier and Type | Method and Description |
---|---|
long |
capacity() |
void |
clear() |
boolean |
containsKey(K key) |
static <K,V> SerializingCache<K,V> |
create(long weightedCapacity,
ISerializer<V> serializer) |
static <K,V> SerializingCache<K,V> |
create(long weightedCapacity,
com.googlecode.concurrentlinkedhashmap.Weigher<RefCountedMemory> weigher,
ISerializer<V> serializer) |
V |
get(K key) |
java.util.Iterator<K> |
hotKeyIterator(int n) |
boolean |
isEmpty() |
java.util.Iterator<K> |
keyIterator() |
void |
put(K key,
V value) |
boolean |
putIfAbsent(K key,
V value) |
void |
remove(K key) |
boolean |
replace(K key,
V oldToReplace,
V value) |
void |
setCapacity(long capacity) |
int |
size() |
long |
weightedSize() |
public static <K,V> SerializingCache<K,V> create(long weightedCapacity, com.googlecode.concurrentlinkedhashmap.Weigher<RefCountedMemory> weigher, ISerializer<V> serializer)
public static <K,V> SerializingCache<K,V> create(long weightedCapacity, ISerializer<V> serializer)
public void setCapacity(long capacity)
setCapacity
in interface CacheSize
public boolean isEmpty()
public long weightedSize()
weightedSize
in interface CacheSize
public boolean putIfAbsent(K key, V value)
putIfAbsent
in interface ICache<K,V>
public java.util.Iterator<K> keyIterator()
keyIterator
in interface ICache<K,V>
public java.util.Iterator<K> hotKeyIterator(int n)
hotKeyIterator
in interface ICache<K,V>
public boolean containsKey(K key)
containsKey
in interface ICache<K,V>
Copyright © 2017 The Apache Software Foundation