mirror of https://github.com/apache/cassandra
add get[Row|Key]CacheEntries to CacheServiceMBean
patch by Chris Burroughs; reviewed by jbellis for CASSANDRA-4859
This commit is contained in:
parent
5e15927fff
commit
99b245d318
|
|
@ -1,4 +1,5 @@
|
|||
1.1.7
|
||||
* add get[Row|Key]CacheEntries to CacheServiceMBean (CASSANDRA-4859)
|
||||
* fix get_paged_slice to wrap to next row correctly (CASSANDRA-4816)
|
||||
* fix indexing empty column values (CASSANDRA-4832)
|
||||
* allow JdbcDate to compose null Date objects (CASSANDRA-4830)
|
||||
|
|
|
|||
|
|
@ -248,11 +248,21 @@ public class CacheService implements CacheServiceMBean
|
|||
return rowCache.weightedSize();
|
||||
}
|
||||
|
||||
public long getRowCacheEntries()
|
||||
{
|
||||
return rowCache.size();
|
||||
}
|
||||
|
||||
public long getKeyCacheSize()
|
||||
{
|
||||
return keyCache.weightedSize() * AVERAGE_KEY_CACHE_ROW_SIZE;
|
||||
}
|
||||
|
||||
public long getKeyCacheEntries()
|
||||
{
|
||||
return keyCache.size();
|
||||
}
|
||||
|
||||
public void reduceCacheSizes()
|
||||
{
|
||||
reduceRowCacheSize();
|
||||
|
|
|
|||
|
|
@ -54,9 +54,11 @@ public interface CacheServiceMBean
|
|||
public long getKeyCacheCapacityInBytes();
|
||||
public void setKeyCacheCapacityInMB(long capacity);
|
||||
|
||||
public long getRowCacheSize();
|
||||
public long getRowCacheSize(); // in bytes
|
||||
public long getRowCacheEntries();
|
||||
|
||||
public long getKeyCacheSize();
|
||||
public long getKeyCacheEntries();
|
||||
|
||||
/**
|
||||
* sets each cache's maximum capacity to "reduce_cache_capacity_to" of its current size
|
||||
|
|
|
|||
Loading…
Reference in New Issue