Package org.apache.cassandra.cache
Class SerializingCache<K,V>
java.lang.Object
org.apache.cassandra.cache.SerializingCache<K,V>
Serializes cache values off-heap.
-
Method Summary
Modifier and TypeMethodDescriptionlongcapacity()voidclear()booleancontainsKey(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) hotKeyIterator(int n) booleanisEmpty()voidbooleanputIfAbsent(K key, V value) voidbooleanvoidsetCapacity(long capacity) intsize()long
-
Method Details
-
create
public static <K,V> SerializingCache<K,V> create(long weightedCapacity, com.github.benmanes.caffeine.cache.Weigher<K, RefCountedMemory> weigher, ISerializer<V> serializer) -
create
-
capacity
public long capacity() -
setCapacity
public void setCapacity(long capacity) - Specified by:
setCapacityin interfaceCacheSize
-
isEmpty
public boolean isEmpty() -
size
public int size() -
weightedSize
public long weightedSize()- Specified by:
weightedSizein interfaceCacheSize
-
clear
public void clear() -
get
-
put
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceICache<K,V>
-
replace
-
remove
-
keyIterator
- Specified by:
keyIteratorin interfaceICache<K,V>
-
hotKeyIterator
- Specified by:
hotKeyIteratorin interfaceICache<K,V>
-
containsKey
- Specified by:
containsKeyin interfaceICache<K,V>
-