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 |
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 CacheServiceMBean
public void setRowCacheSavePeriodInSeconds(int seconds)
setRowCacheSavePeriodInSeconds
in interface CacheServiceMBean
public int getKeyCacheSavePeriodInSeconds()
getKeyCacheSavePeriodInSeconds
in interface CacheServiceMBean
public void setKeyCacheSavePeriodInSeconds(int seconds)
setKeyCacheSavePeriodInSeconds
in interface CacheServiceMBean
public int getCounterCacheSavePeriodInSeconds()
getCounterCacheSavePeriodInSeconds
in interface CacheServiceMBean
public void setCounterCacheSavePeriodInSeconds(int seconds)
setCounterCacheSavePeriodInSeconds
in interface CacheServiceMBean
public int getRowCacheKeysToSave()
getRowCacheKeysToSave
in interface CacheServiceMBean
public void setRowCacheKeysToSave(int count)
setRowCacheKeysToSave
in interface CacheServiceMBean
public int getKeyCacheKeysToSave()
getKeyCacheKeysToSave
in interface CacheServiceMBean
public void setKeyCacheKeysToSave(int count)
setKeyCacheKeysToSave
in interface CacheServiceMBean
public int getCounterCacheKeysToSave()
getCounterCacheKeysToSave
in interface CacheServiceMBean
public void setCounterCacheKeysToSave(int count)
setCounterCacheKeysToSave
in interface CacheServiceMBean
public void invalidateKeyCache()
CacheServiceMBean
invalidateKeyCache
in interface CacheServiceMBean
public void invalidateKeyCacheForCf(TableMetadata tableMetadata)
public void invalidateRowCache()
CacheServiceMBean
invalidateRowCache
in interface CacheServiceMBean
public void invalidateRowCacheForCf(TableMetadata tableMetadata)
public void invalidateCounterCacheForCf(TableMetadata tableMetadata)
public void invalidateCounterCache()
invalidateCounterCache
in interface CacheServiceMBean
public void setRowCacheCapacityInMB(long capacity)
setRowCacheCapacityInMB
in interface CacheServiceMBean
public void setKeyCacheCapacityInMB(long capacity)
setKeyCacheCapacityInMB
in interface CacheServiceMBean
public void setCounterCacheCapacityInMB(long capacity)
setCounterCacheCapacityInMB
in interface CacheServiceMBean
public void saveCaches() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
CacheServiceMBean
saveCaches
in interface CacheServiceMBean
java.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 © 2009-2021 The Apache Software Foundation