public class CacheService extends java.lang.Object implements CacheServiceMBean
| Modifier and Type | Class and Description |
|---|---|
static class |
CacheService.CacheType |
static class |
CacheService.CounterCacheSerializer |
static class |
CacheService.KeyCacheSerializer |
static class |
CacheService.RowCacheSerializer |
| Modifier and Type | Field and Description |
|---|---|
AutoSavingCache<CounterCacheKey,ClockAndCount> |
counterCache |
static CacheService |
instance |
AutoSavingCache<KeyCacheKey,RowIndexEntry> |
keyCache |
static java.lang.String |
MBEAN_NAME |
AutoSavingCache<RowCacheKey,IRowCacheEntry> |
rowCache |
| Modifier and Type | Method and Description |
|---|---|
int |
getCounterCacheKeysToSave() |
int |
getCounterCacheSavePeriodInSeconds() |
int |
getKeyCacheKeysToSave() |
int |
getKeyCacheSavePeriodInSeconds() |
int |
getRowCacheKeysToSave() |
int |
getRowCacheSavePeriodInSeconds() |
void |
invalidateCounterCache() |
void |
invalidateCounterCacheForCf(Pair<java.lang.String,java.lang.String> ksAndCFName) |
void |
invalidateKeyCache()
invalidate the key cache; for use after invalidating row cache
|
void |
invalidateKeyCacheForCf(Pair<java.lang.String,java.lang.String> ksAndCFName) |
void |
invalidateRowCache()
invalidate the row cache; for use after bulk loading via BinaryMemtable
|
void |
invalidateRowCacheForCf(Pair<java.lang.String,java.lang.String> ksAndCFName) |
void |
saveCaches()
save row and key caches
|
void |
setCounterCacheCapacityInMB(long capacity) |
void |
setCounterCacheKeysToSave(int count) |
void |
setCounterCacheSavePeriodInSeconds(int seconds) |
void |
setKeyCacheCapacityInMB(long capacity) |
void |
setKeyCacheKeysToSave(int count) |
void |
setKeyCacheSavePeriodInSeconds(int seconds) |
void |
setRowCacheCapacityInMB(long capacity) |
void |
setRowCacheKeysToSave(int count) |
void |
setRowCacheSavePeriodInSeconds(int seconds) |
public static final java.lang.String MBEAN_NAME
public static final CacheService instance
public final AutoSavingCache<KeyCacheKey,RowIndexEntry> keyCache
public final AutoSavingCache<RowCacheKey,IRowCacheEntry> rowCache
public final AutoSavingCache<CounterCacheKey,ClockAndCount> counterCache
public int getRowCacheSavePeriodInSeconds()
getRowCacheSavePeriodInSeconds in interface CacheServiceMBeanpublic void setRowCacheSavePeriodInSeconds(int seconds)
setRowCacheSavePeriodInSeconds in interface CacheServiceMBeanpublic int getKeyCacheSavePeriodInSeconds()
getKeyCacheSavePeriodInSeconds in interface CacheServiceMBeanpublic void setKeyCacheSavePeriodInSeconds(int seconds)
setKeyCacheSavePeriodInSeconds in interface CacheServiceMBeanpublic int getCounterCacheSavePeriodInSeconds()
getCounterCacheSavePeriodInSeconds in interface CacheServiceMBeanpublic void setCounterCacheSavePeriodInSeconds(int seconds)
setCounterCacheSavePeriodInSeconds in interface CacheServiceMBeanpublic int getRowCacheKeysToSave()
getRowCacheKeysToSave in interface CacheServiceMBeanpublic void setRowCacheKeysToSave(int count)
setRowCacheKeysToSave in interface CacheServiceMBeanpublic int getKeyCacheKeysToSave()
getKeyCacheKeysToSave in interface CacheServiceMBeanpublic void setKeyCacheKeysToSave(int count)
setKeyCacheKeysToSave in interface CacheServiceMBeanpublic int getCounterCacheKeysToSave()
getCounterCacheKeysToSave in interface CacheServiceMBeanpublic void setCounterCacheKeysToSave(int count)
setCounterCacheKeysToSave in interface CacheServiceMBeanpublic void invalidateKeyCache()
CacheServiceMBeaninvalidateKeyCache in interface CacheServiceMBeanpublic void invalidateKeyCacheForCf(Pair<java.lang.String,java.lang.String> ksAndCFName)
public void invalidateRowCache()
CacheServiceMBeaninvalidateRowCache in interface CacheServiceMBeanpublic void invalidateRowCacheForCf(Pair<java.lang.String,java.lang.String> ksAndCFName)
public void invalidateCounterCacheForCf(Pair<java.lang.String,java.lang.String> ksAndCFName)
public void invalidateCounterCache()
invalidateCounterCache in interface CacheServiceMBeanpublic void setRowCacheCapacityInMB(long capacity)
setRowCacheCapacityInMB in interface CacheServiceMBeanpublic void setKeyCacheCapacityInMB(long capacity)
setKeyCacheCapacityInMB in interface CacheServiceMBeanpublic void setCounterCacheCapacityInMB(long capacity)
setCounterCacheCapacityInMB in interface CacheServiceMBeanpublic void saveCaches()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
CacheServiceMBeansaveCaches in interface CacheServiceMBeanjava.util.concurrent.ExecutionException - when attempting to retrieve the result of a task that aborted by throwing an exceptionjava.lang.InterruptedException - when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.Copyright © 2018 The Apache Software Foundation