Package org.apache.cassandra.service
Class CacheService
- java.lang.Object
-
- org.apache.cassandra.service.CacheService
-
- All Implemented Interfaces:
CacheServiceMBean
public class CacheService extends java.lang.Object implements CacheServiceMBean
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCacheService.CacheTypestatic classCacheService.CounterCacheSerializerstatic classCacheService.KeyCacheSerializerstatic classCacheService.RowCacheSerializer
-
Field Summary
Fields Modifier and Type Field Description AutoSavingCache<CounterCacheKey,ClockAndCount>counterCachestatic CacheServiceinstanceAutoSavingCache<KeyCacheKey,RowIndexEntry>keyCachestatic java.lang.StringMBEAN_NAMEAutoSavingCache<RowCacheKey,IRowCacheEntry>rowCache
-
Method Summary
-
-
-
Field Detail
-
MBEAN_NAME
public static final java.lang.String MBEAN_NAME
- See Also:
- Constant Field Values
-
instance
public static final CacheService instance
-
keyCache
public final AutoSavingCache<KeyCacheKey,RowIndexEntry> keyCache
-
rowCache
public final AutoSavingCache<RowCacheKey,IRowCacheEntry> rowCache
-
counterCache
public final AutoSavingCache<CounterCacheKey,ClockAndCount> counterCache
-
-
Method Detail
-
getRowCacheSavePeriodInSeconds
public int getRowCacheSavePeriodInSeconds()
- Specified by:
getRowCacheSavePeriodInSecondsin interfaceCacheServiceMBean
-
setRowCacheSavePeriodInSeconds
public void setRowCacheSavePeriodInSeconds(int seconds)
- Specified by:
setRowCacheSavePeriodInSecondsin interfaceCacheServiceMBean
-
getKeyCacheSavePeriodInSeconds
public int getKeyCacheSavePeriodInSeconds()
- Specified by:
getKeyCacheSavePeriodInSecondsin interfaceCacheServiceMBean
-
setKeyCacheSavePeriodInSeconds
public void setKeyCacheSavePeriodInSeconds(int seconds)
- Specified by:
setKeyCacheSavePeriodInSecondsin interfaceCacheServiceMBean
-
getCounterCacheSavePeriodInSeconds
public int getCounterCacheSavePeriodInSeconds()
- Specified by:
getCounterCacheSavePeriodInSecondsin interfaceCacheServiceMBean
-
setCounterCacheSavePeriodInSeconds
public void setCounterCacheSavePeriodInSeconds(int seconds)
- Specified by:
setCounterCacheSavePeriodInSecondsin interfaceCacheServiceMBean
-
getRowCacheKeysToSave
public int getRowCacheKeysToSave()
- Specified by:
getRowCacheKeysToSavein interfaceCacheServiceMBean
-
setRowCacheKeysToSave
public void setRowCacheKeysToSave(int count)
- Specified by:
setRowCacheKeysToSavein interfaceCacheServiceMBean
-
getKeyCacheKeysToSave
public int getKeyCacheKeysToSave()
- Specified by:
getKeyCacheKeysToSavein interfaceCacheServiceMBean
-
setKeyCacheKeysToSave
public void setKeyCacheKeysToSave(int count)
- Specified by:
setKeyCacheKeysToSavein interfaceCacheServiceMBean
-
getCounterCacheKeysToSave
public int getCounterCacheKeysToSave()
- Specified by:
getCounterCacheKeysToSavein interfaceCacheServiceMBean
-
setCounterCacheKeysToSave
public void setCounterCacheKeysToSave(int count)
- Specified by:
setCounterCacheKeysToSavein interfaceCacheServiceMBean
-
invalidateKeyCache
public void invalidateKeyCache()
Description copied from interface:CacheServiceMBeaninvalidate the key cache; for use after invalidating row cache- Specified by:
invalidateKeyCachein interfaceCacheServiceMBean
-
invalidateKeyCacheForCf
public void invalidateKeyCacheForCf(TableMetadata tableMetadata)
-
invalidateRowCache
public void invalidateRowCache()
Description copied from interface:CacheServiceMBeaninvalidate the row cache; for use after bulk loading via BinaryMemtable- Specified by:
invalidateRowCachein interfaceCacheServiceMBean
-
invalidateRowCacheForCf
public void invalidateRowCacheForCf(TableMetadata tableMetadata)
-
invalidateCounterCacheForCf
public void invalidateCounterCacheForCf(TableMetadata tableMetadata)
-
invalidateCounterCache
public void invalidateCounterCache()
- Specified by:
invalidateCounterCachein interfaceCacheServiceMBean
-
setRowCacheCapacityInMB
public void setRowCacheCapacityInMB(long capacity)
- Specified by:
setRowCacheCapacityInMBin interfaceCacheServiceMBean
-
setKeyCacheCapacityInMB
public void setKeyCacheCapacityInMB(long capacity)
- Specified by:
setKeyCacheCapacityInMBin interfaceCacheServiceMBean
-
setCounterCacheCapacityInMB
public void setCounterCacheCapacityInMB(long capacity)
- Specified by:
setCounterCacheCapacityInMBin interfaceCacheServiceMBean
-
saveCaches
public void saveCaches() throws java.util.concurrent.ExecutionException, java.lang.InterruptedExceptionDescription copied from interface:CacheServiceMBeansave row and key caches- Specified by:
saveCachesin interfaceCacheServiceMBean- Throws:
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.
-
-