org.apache.cassandra.cache
Class AutoSavingCache<K extends CacheKey,V>
java.lang.Object
org.apache.cassandra.cache.InstrumentingCache<K,V>
org.apache.cassandra.cache.AutoSavingCache<K,V>
public class AutoSavingCache<K extends CacheKey,V>
- extends InstrumentingCache<K,V>
Methods inherited from class org.apache.cassandra.cache.InstrumentingCache |
clear, containsKey, get, getCapacity, getHits, getInternal, getKeySet, getRecentHitRate, getRequests, hotKeySet, isCapacitySetManually, isPutCopying, put, putIfAbsent, remove, replace, setCapacity, size, updateCapacity, weightedSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
flushInProgress
public static final java.util.concurrent.atomic.AtomicBoolean flushInProgress
- True if a cache flush is currently executing: only one may execute at a time.
saveTask
protected volatile java.util.concurrent.ScheduledFuture<?> saveTask
cacheType
protected final CacheService.CacheType cacheType
AutoSavingCache
public AutoSavingCache(ICache<K,V> cache,
CacheService.CacheType cacheType)
getCachePath
public java.io.File getCachePath(java.lang.String ksName,
java.lang.String cfName)
getWriter
public AutoSavingCache.Writer getWriter(int keysToSave)
scheduleSaving
public void scheduleSaving(int savePeriodInSeconds,
int keysToSave)
readSaved
public java.util.Set<DecoratedKey> readSaved(java.lang.String ksName,
java.lang.String cfName)
submitWrite
public java.util.concurrent.Future<?> submitWrite(int keysToSave)
reduceCacheSize
public void reduceCacheSize()
estimateSizeToSave
public int estimateSizeToSave(java.util.Set<K> keys)
Copyright © 2012 The Apache Software Foundation