public class AutoSavingCache<K extends CacheKey,V> extends InstrumentingCache<K,V>
Modifier and Type | Class and Description |
---|---|
static interface |
AutoSavingCache.CacheSerializer<K extends CacheKey,V> |
class |
AutoSavingCache.Writer |
Modifier and Type | Field and Description |
---|---|
protected CacheService.CacheType |
cacheType |
static java.util.Set<CacheService.CacheType> |
flushInProgress
True if a cache flush is currently executing: only one may execute at a time.
|
protected java.util.concurrent.ScheduledFuture<?> |
saveTask |
Constructor and Description |
---|
AutoSavingCache(ICache<K,V> cache,
CacheService.CacheType cacheType,
AutoSavingCache.CacheSerializer<K,V> cacheloader) |
Modifier and Type | Method and Description |
---|---|
java.io.File |
getCachePath(java.lang.String ksName,
java.lang.String cfName,
java.lang.String version) |
AutoSavingCache.Writer |
getWriter(int keysToSave) |
int |
loadSaved(ColumnFamilyStore cfs) |
void |
scheduleSaving(int savePeriodInSeconds,
int keysToSave) |
java.util.concurrent.Future<?> |
submitWrite(int keysToSave) |
clear, containsKey, get, getCapacity, getInternal, getKeySet, getMetrics, hotKeySet, isCapacitySetManually, put, putIfAbsent, remove, replace, setCapacity, size, updateCapacity, weightedSize
public static final java.util.Set<CacheService.CacheType> flushInProgress
protected volatile java.util.concurrent.ScheduledFuture<?> saveTask
protected final CacheService.CacheType cacheType
public AutoSavingCache(ICache<K,V> cache, CacheService.CacheType cacheType, AutoSavingCache.CacheSerializer<K,V> cacheloader)
public java.io.File getCachePath(java.lang.String ksName, java.lang.String cfName, java.lang.String version)
public AutoSavingCache.Writer getWriter(int keysToSave)
public void scheduleSaving(int savePeriodInSeconds, int keysToSave)
public int loadSaved(ColumnFamilyStore cfs)
public java.util.concurrent.Future<?> submitWrite(int keysToSave)
Copyright © 2013 The Apache Software Foundation