Interface CacheManagerSampler
-
- All Known Subinterfaces:
SampledCacheManagerMBean
- All Known Implementing Classes:
CacheManagerSamplerImpl,SampledCacheManager
public interface CacheManagerSamplerAn abstraction for sampled cache manager usage statistics.- Author:
- Abhishek Sanoujam, byoukste
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearAll()Clears the contents of all caches in the CacheManager, but without removing any caches.java.lang.Object[][]executeQuery(java.lang.String queryString)Execute a BMSQL query against the CacheManager and return result grid.java.lang.StringgenerateActiveConfigDeclaration()generateActiveConfigDeclarationjava.lang.StringgenerateActiveConfigDeclaration(java.lang.String cacheName)generateActiveConfigDeclarationfloatgetCacheAverageGetTime()longgetCacheAverageSearchTime()longgetCacheEvictionRate()longgetCacheExpirationRate()longgetCacheHitRate()longgetCacheInMemoryHitRate()longgetCacheInMemoryMissRate()java.util.Map<java.lang.String,long[]>getCacheMetrics()Get a map of cache name to performance metrics (hits, misses).longgetCacheMissRate()java.lang.String[]getCacheNames()Gets the cache names managed by the CacheManagerlonggetCacheOffHeapHitRate()longgetCacheOffHeapMissRate()longgetCacheOnDiskHitRate()longgetCacheOnDiskMissRate()longgetCachePutRate()longgetCacheRemoveRate()longgetCacheSearchRate()longgetCacheUpdateRate()java.lang.StringgetClusterUUID()Gets the cluster uuid if applicable.booleangetHasWriteBehindWriter()Returns whether any caches are configured for write-behindlonggetMaxBytesLocalDisk()Maximum number of bytes of entries in the disk stores of all caches that did not declare their own max size.java.lang.StringgetMaxBytesLocalDiskAsString()longgetMaxBytesLocalHeap()Maximum number of bytes of entries in the heap memory stores of all caches that did not declare their own max size.java.lang.StringgetMaxBytesLocalHeapAsString()longgetMaxBytesLocalOffHeap()Maximum number of bytes of entries in the off-heap stores of all caches that did not declare their own max size.java.lang.StringgetMaxBytesLocalOffHeapAsString()java.lang.StringgetName()Gets the actual name of the cache manager.booleangetSearchable()java.lang.StringgetStatus()Gets the status attribute of the EhcachebooleangetTransactional()Are any of the caches transactionallonggetTransactionCommitRate()longgetTransactionCommittedCount()Get the committed transactions countlonggetTransactionRollbackRate()longgetTransactionRolledBackCount()Get the rolled back transactions countlonggetTransactionTimedOutCount()Get the timed out transactions count.intgetWriterMaxQueueSize()Maximum elements that can be queued for processing by the write-behind writerlonggetWriterQueueLength()Returns the total length of all write-behind queues across all cachesbooleanisEnabled()Returns if each cache is enabled.voidsetEnabled(boolean enabled)Enables/disables each cache contained by this CacheManagervoidsetMaxBytesLocalDisk(long maxBytes)voidsetMaxBytesLocalDiskAsString(java.lang.String maxBytes)voidsetMaxBytesLocalHeap(long maxBytes)voidsetMaxBytesLocalHeapAsString(java.lang.String maxBytes)voidshutdown()Shuts down the CacheManager.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Gets the actual name of the cache manager.
-
getClusterUUID
java.lang.String getClusterUUID()
Gets the cluster uuid if applicable.- Returns:
- the cluster uuid
-
getStatus
java.lang.String getStatus()
Gets the status attribute of the Ehcache- Returns:
- The status value, as a String from the Status enum class
-
setEnabled
void setEnabled(boolean enabled)
Enables/disables each cache contained by this CacheManager- Parameters:
enabled-
-
isEnabled
boolean isEnabled()
Returns if each cache is enabled.- Returns:
- boolean indicating that each cache is enabled
-
shutdown
void shutdown()
Shuts down the CacheManager.If the shutdown occurs on the singleton, then the singleton is removed, so that if a singleton access method is called, a new singleton will be created.
-
clearAll
void clearAll()
Clears the contents of all caches in the CacheManager, but without removing any caches.This method is not synchronized. It only guarantees to clear those elements in a cache at the time that the
Ehcache.removeAll()mehod on each cache is called.
-
getCacheNames
java.lang.String[] getCacheNames() throws java.lang.IllegalStateExceptionGets the cache names managed by the CacheManager- Throws:
java.lang.IllegalStateException
-
getCacheMetrics
java.util.Map<java.lang.String,long[]> getCacheMetrics()
Get a map of cache name to performance metrics (hits, misses).- Returns:
- a map of cache metrics
-
getCacheHitRate
long getCacheHitRate()
- Returns:
- aggregate hit rate
-
getCacheInMemoryHitRate
long getCacheInMemoryHitRate()
- Returns:
- aggregate in-memory hit rate
-
getCacheOffHeapHitRate
long getCacheOffHeapHitRate()
- Returns:
- aggregate off-heap hit rate
-
getCacheOnDiskHitRate
long getCacheOnDiskHitRate()
- Returns:
- aggregate on-disk hit rate
-
getCacheMissRate
long getCacheMissRate()
- Returns:
- aggregate miss rate
-
getCacheInMemoryMissRate
long getCacheInMemoryMissRate()
- Returns:
- aggregate in-memory miss rate
-
getCacheOffHeapMissRate
long getCacheOffHeapMissRate()
- Returns:
- aggregate off-heap miss rate
-
getCacheOnDiskMissRate
long getCacheOnDiskMissRate()
- Returns:
- aggregate on-disk miss rate
-
getCachePutRate
long getCachePutRate()
- Returns:
- aggregate put rate
-
getCacheUpdateRate
long getCacheUpdateRate()
- Returns:
- aggregate update rate
-
getCacheRemoveRate
long getCacheRemoveRate()
- Returns:
- aggregate remove rate
-
getCacheEvictionRate
long getCacheEvictionRate()
- Returns:
- aggregate eviction rate
-
getCacheExpirationRate
long getCacheExpirationRate()
- Returns:
- aggregate expiration rate
-
getCacheAverageGetTime
float getCacheAverageGetTime()
- Returns:
- aggregate average get time (ms.)
-
getSearchable
boolean getSearchable()
- Returns:
- if any contained caches are configured for search
-
getCacheSearchRate
long getCacheSearchRate()
- Returns:
- aggregate search rate
-
getCacheAverageSearchTime
long getCacheAverageSearchTime()
- Returns:
- aggregate search time
-
generateActiveConfigDeclaration
java.lang.String generateActiveConfigDeclaration()
generateActiveConfigDeclaration- Returns:
- CacheManager configuration as String
-
generateActiveConfigDeclaration
java.lang.String generateActiveConfigDeclaration(java.lang.String cacheName)
generateActiveConfigDeclaration- Parameters:
cacheName-- Returns:
- Cache configuration as String
-
getTransactional
boolean getTransactional()
Are any of the caches transactional- See Also:
CacheConfiguration.TransactionalMode
-
getTransactionCommittedCount
long getTransactionCommittedCount()
Get the committed transactions count- Returns:
- the committed transactions count
-
getTransactionCommitRate
long getTransactionCommitRate()
- Returns:
- aggregate Xa commit rate
-
getTransactionRolledBackCount
long getTransactionRolledBackCount()
Get the rolled back transactions count- Returns:
- the rolled back transactions count
-
getTransactionRollbackRate
long getTransactionRollbackRate()
- Returns:
- aggregate Xa rollback rate
-
getTransactionTimedOutCount
long getTransactionTimedOutCount()
Get the timed out transactions count. Note that only transactions which failed to commit due to a timeout are taken into account- Returns:
- the timed out transactions count
-
getHasWriteBehindWriter
boolean getHasWriteBehindWriter()
Returns whether any caches are configured for write-behind
-
getWriterQueueLength
long getWriterQueueLength()
Returns the total length of all write-behind queues across all caches- Returns:
- aggregate writer-behind queue length
-
getWriterMaxQueueSize
int getWriterMaxQueueSize()
Maximum elements that can be queued for processing by the write-behind writer- Returns:
- aggregate of the maximum elements that can be waiting to be processed by the write-behind writer across all caches
-
getMaxBytesLocalDisk
long getMaxBytesLocalDisk()
Maximum number of bytes of entries in the disk stores of all caches that did not declare their own max size.- Returns:
- maximum number of bytes in the disk stores of all caches that did not declare their own max size.
-
setMaxBytesLocalDisk
void setMaxBytesLocalDisk(long maxBytes)
- Parameters:
maxBytes-
-
setMaxBytesLocalDiskAsString
void setMaxBytesLocalDiskAsString(java.lang.String maxBytes)
- Parameters:
maxBytes-
-
getMaxBytesLocalDiskAsString
java.lang.String getMaxBytesLocalDiskAsString()
- Returns:
- Original input for maxBytesLocalDisk
-
getMaxBytesLocalHeap
long getMaxBytesLocalHeap()
Maximum number of bytes of entries in the heap memory stores of all caches that did not declare their own max size.- Returns:
- maximum number of bytes in the heap memory stores of all caches that did not declare their own max size.
-
getMaxBytesLocalHeapAsString
java.lang.String getMaxBytesLocalHeapAsString()
- Returns:
- Original input for maxBytesLocalHeap
-
setMaxBytesLocalHeap
void setMaxBytesLocalHeap(long maxBytes)
- Parameters:
maxBytes-
-
setMaxBytesLocalHeapAsString
void setMaxBytesLocalHeapAsString(java.lang.String maxBytes)
- Parameters:
maxBytes-
-
getMaxBytesLocalOffHeap
long getMaxBytesLocalOffHeap()
Maximum number of bytes of entries in the off-heap stores of all caches that did not declare their own max size.- Returns:
- maximum number of bytes in the off-heap stores of all caches that did not declare their own max size.
-
getMaxBytesLocalOffHeapAsString
java.lang.String getMaxBytesLocalOffHeapAsString()
- Returns:
- Original input for maxBytesLocalOffHeap
-
executeQuery
java.lang.Object[][] executeQuery(java.lang.String queryString)
Execute a BMSQL query against the CacheManager and return result grid.- Parameters:
queryString-- Returns:
- query result grid
-
-