Package org.apache.cassandra.cache
Class SerializingCache<K,V>
- java.lang.Object
-
- org.apache.cassandra.cache.SerializingCache<K,V>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
capacity()
void
clear()
boolean
containsKey(K key)
static <K,V>
SerializingCache<K,V>create(long weightedCapacity, com.github.benmanes.caffeine.cache.Weigher<K,RefCountedMemory> weigher, ISerializer<V> serializer)
static <K,V>
SerializingCache<K,V>create(long weightedCapacity, 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()
-
-
-
Method Detail
-
create
public static <K,V> SerializingCache<K,V> create(long weightedCapacity, com.github.benmanes.caffeine.cache.Weigher<K,RefCountedMemory> weigher, ISerializer<V> serializer)
-
create
public static <K,V> SerializingCache<K,V> create(long weightedCapacity, ISerializer<V> serializer)
-
setCapacity
public void setCapacity(long capacity)
- Specified by:
setCapacity
in interfaceCacheSize
-
isEmpty
public boolean isEmpty()
-
weightedSize
public long weightedSize()
- Specified by:
weightedSize
in interfaceCacheSize
-
putIfAbsent
public boolean putIfAbsent(K key, V value)
- Specified by:
putIfAbsent
in interfaceICache<K,V>
-
keyIterator
public java.util.Iterator<K> keyIterator()
- Specified by:
keyIterator
in interfaceICache<K,V>
-
hotKeyIterator
public java.util.Iterator<K> hotKeyIterator(int n)
- Specified by:
hotKeyIterator
in interfaceICache<K,V>
-
containsKey
public boolean containsKey(K key)
- Specified by:
containsKey
in interfaceICache<K,V>
-
-