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 longcapacity()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)Vget(K key)java.util.Iterator<K>hotKeyIterator(int n)booleanisEmpty()java.util.Iterator<K>keyIterator()voidput(K key, V value)booleanputIfAbsent(K key, V value)voidremove(K key)booleanreplace(K key, V oldToReplace, V value)voidsetCapacity(long capacity)intsize()longweightedSize()
-
-
-
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:
setCapacityin interfaceCacheSize
-
isEmpty
public boolean isEmpty()
-
weightedSize
public long weightedSize()
- Specified by:
weightedSizein interfaceCacheSize
-
putIfAbsent
public boolean putIfAbsent(K key, V value)
- Specified by:
putIfAbsentin interfaceICache<K,V>
-
keyIterator
public java.util.Iterator<K> keyIterator()
- Specified by:
keyIteratorin interfaceICache<K,V>
-
hotKeyIterator
public java.util.Iterator<K> hotKeyIterator(int n)
- Specified by:
hotKeyIteratorin interfaceICache<K,V>
-
containsKey
public boolean containsKey(K key)
- Specified by:
containsKeyin interfaceICache<K,V>
-
-