Top Description Methods
net.sf.ehcache.management.sampled

public Interface CacheManagerSampler

Known Direct Subinterfaces
net.sf.ehcache.management.sampled.SampledCacheManagerMBean
Known Direct Implementers
net.sf.ehcache.management.sampled.CacheManagerSamplerImpl
Imports
java.util.Map, net.sf.ehcache.util.ManagementAttribute

An abstraction for sampled cache manager usage statistics.
Authors
Abhishek Sanoujam, byoukste

Method Summary

Modifier and TypeMethod and Description
public void
clearAll()

Clears the contents of all caches in the CacheManager, but without removing any caches.

public Object[][]

Returns:

query result grid
executeQuery
(String queryString)

Execute a BMSQL query against the CacheManager and return result grid.

public String

Returns:

CacheManager configuration as String
generateActiveConfigDeclaration
()

generateActiveConfigDeclaration

public String

Returns:

Cache configuration as String
generateActiveConfigDeclaration
(String cacheName)

generateActiveConfigDeclaration

public float

Returns:

aggregate average get time (ms.)
getCacheAverageGetTime
()

public long

Returns:

aggregate search time
getCacheAverageSearchTime
()

public long

Returns:

aggregate eviction rate
getCacheEvictionRate
()

public long

Returns:

aggregate expiration rate
getCacheExpirationRate
()

public long

Returns:

aggregate hit rate
getCacheHitRate
()

public long

Returns:

aggregate in-memory hit rate
getCacheInMemoryHitRate
()

public long

Returns:

aggregate in-memory miss rate
getCacheInMemoryMissRate
()

public Map<String, long[]>

Returns:

a map of cache metrics
getCacheMetrics
()

Get a map of cache name to performance metrics (hits, misses).

public long

Returns:

aggregate miss rate
getCacheMissRate
()

public String[]
getCacheNames()

Gets the cache names managed by the CacheManager

public long

Returns:

aggregate off-heap hit rate
getCacheOffHeapHitRate
()

public long

Returns:

aggregate off-heap miss rate
getCacheOffHeapMissRate
()

public long

Returns:

aggregate on-disk hit rate
getCacheOnDiskHitRate
()

public long

Returns:

aggregate on-disk miss rate
getCacheOnDiskMissRate
()

public long

Returns:

aggregate put rate
getCachePutRate
()

public long

Returns:

aggregate remove rate
getCacheRemoveRate
()

public long

Returns:

aggregate search rate
getCacheSearchRate
()

public long

Returns:

aggregate update rate
getCacheUpdateRate
()

public String

Returns:

the cluster uuid
getClusterUUID
()

Gets the cluster uuid if applicable.

public boolean
getHasWriteBehindWriter()

Returns whether any caches are configured for write-behind

public long

Returns:

maximum number of bytes in the disk stores of all caches that did not declare their own max size.
getMaxBytesLocalDisk
()

Maximum number of bytes of entries in the disk stores of all caches that did not declare their own max size.

public String

Returns:

Original input for maxBytesLocalDisk
getMaxBytesLocalDiskAsString
()

public long

Returns:

maximum number of bytes in the heap memory stores of all caches that did not declare their own max size.
getMaxBytesLocalHeap
()

Maximum number of bytes of entries in the heap memory stores of all caches that did not declare their own max size.

public String

Returns:

Original input for maxBytesLocalHeap
getMaxBytesLocalHeapAsString
()

public long

Returns:

maximum number of bytes in the off-heap stores of all caches that did not declare their own max size.
getMaxBytesLocalOffHeap
()

Maximum number of bytes of entries in the off-heap stores of all caches that did not declare their own max size.

public String

Returns:

Original input for maxBytesLocalOffHeap
getMaxBytesLocalOffHeapAsString
()

public String
getName()

Gets the actual name of the cache manager.

public boolean

Returns:

if any contained caches are configured for search
getSearchable
()

public String

Returns:

The status value, as a String from the Status enum class
getStatus
()

Gets the status attribute of the Ehcache

public boolean
getTransactional()

Are any of the caches transactional

public long

Returns:

aggregate Xa commit rate
getTransactionCommitRate
()

public long

Returns:

the committed transactions count
getTransactionCommittedCount
()

Get the committed transactions count

public long

Returns:

aggregate Xa rollback rate
getTransactionRollbackRate
()

public long

Returns:

the rolled back transactions count
getTransactionRolledBackCount
()

Get the rolled back transactions count

public long

Returns:

the timed out transactions count
getTransactionTimedOutCount
()

Get the timed out transactions count.

public int

Returns:

aggregate of the maximum elements that can be waiting to be processed by the write-behind writer across all caches
getWriterMaxQueueSize
()

Maximum elements that can be queued for processing by the write-behind writer

public long

Returns:

aggregate writer-behind queue length
getWriterQueueLength
()

Returns the total length of all write-behind queues across all caches

public boolean

Returns:

boolean indicating that each cache is enabled
isEnabled
()

Returns if each cache is enabled.

public void
setEnabled(boolean enabled)

Enables/disables each cache contained by this CacheManager

public void
setMaxBytesLocalDisk(long maxBytes)

public void
public void
setMaxBytesLocalHeap(long maxBytes)

public void
public void
shutdown()

Shuts down the CacheManager.

Method Detail

clearAllback to summary
public 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 net.sf.ehcache.Ehcache#removeAll() mehod on each cache is called.

executeQueryback to summary
public Object[][] executeQuery(String queryString)

Execute a BMSQL query against the CacheManager and return result grid.

Returns:Object[][]

query result grid

generateActiveConfigDeclarationback to summary
public String generateActiveConfigDeclaration()

generateActiveConfigDeclaration

Returns:String

CacheManager configuration as String

generateActiveConfigDeclarationback to summary
public String generateActiveConfigDeclaration(String cacheName)

generateActiveConfigDeclaration

Returns:String

Cache configuration as String

getCacheAverageGetTimeback to summary
public float getCacheAverageGetTime()
Returns:float

aggregate average get time (ms.)

getCacheAverageSearchTimeback to summary
public long getCacheAverageSearchTime()
Returns:long

aggregate search time

getCacheEvictionRateback to summary
public long getCacheEvictionRate()
Returns:long

aggregate eviction rate

getCacheExpirationRateback to summary
public long getCacheExpirationRate()
Returns:long

aggregate expiration rate

getCacheHitRateback to summary
public long getCacheHitRate()
Returns:long

aggregate hit rate

getCacheInMemoryHitRateback to summary
public long getCacheInMemoryHitRate()
Returns:long

aggregate in-memory hit rate

getCacheInMemoryMissRateback to summary
public long getCacheInMemoryMissRate()
Returns:long

aggregate in-memory miss rate

getCacheMetricsback to summary
public Map<String, long[]> getCacheMetrics()

Get a map of cache name to performance metrics (hits, misses).

Returns:Map<String, long[]>

a map of cache metrics

getCacheMissRateback to summary
public long getCacheMissRate()
Returns:long

aggregate miss rate

getCacheNamesback to summary
public String[] getCacheNames() throws IllegalStateException

Gets the cache names managed by the CacheManager

Annotations
@ManagementAttribute
getCacheOffHeapHitRateback to summary
public long getCacheOffHeapHitRate()
Returns:long

aggregate off-heap hit rate

getCacheOffHeapMissRateback to summary
public long getCacheOffHeapMissRate()
Returns:long

aggregate off-heap miss rate

getCacheOnDiskHitRateback to summary
public long getCacheOnDiskHitRate()
Returns:long

aggregate on-disk hit rate

getCacheOnDiskMissRateback to summary
public long getCacheOnDiskMissRate()
Returns:long

aggregate on-disk miss rate

getCachePutRateback to summary
public long getCachePutRate()
Returns:long

aggregate put rate

getCacheRemoveRateback to summary
public long getCacheRemoveRate()
Returns:long

aggregate remove rate

getCacheSearchRateback to summary
public long getCacheSearchRate()
Returns:long

aggregate search rate

getCacheUpdateRateback to summary
public long getCacheUpdateRate()
Returns:long

aggregate update rate

getClusterUUIDback to summary
public String getClusterUUID()

Gets the cluster uuid if applicable.

Returns:String

the cluster uuid

Annotations
@ManagementAttribute
getHasWriteBehindWriterback to summary
public boolean getHasWriteBehindWriter()

Returns whether any caches are configured for write-behind

Annotations
@ManagementAttribute
getMaxBytesLocalDiskback to summary
public long getMaxBytesLocalDisk()

Maximum number of bytes of entries in the disk stores of all caches that did not declare their own max size.

Returns:long

maximum number of bytes in the disk stores of all caches that did not declare their own max size.

Annotations
@ManagementAttribute
getMaxBytesLocalDiskAsStringback to summary
public String getMaxBytesLocalDiskAsString()
Returns:String

Original input for maxBytesLocalDisk

Annotations
@ManagementAttribute
getMaxBytesLocalHeapback to summary
public 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:long

maximum number of bytes in the heap memory stores of all caches that did not declare their own max size.

Annotations
@ManagementAttribute
getMaxBytesLocalHeapAsStringback to summary
public String getMaxBytesLocalHeapAsString()
Returns:String

Original input for maxBytesLocalHeap

Annotations
@ManagementAttribute
getMaxBytesLocalOffHeapback to summary
public 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:long

maximum number of bytes in the off-heap stores of all caches that did not declare their own max size.

Annotations
@ManagementAttribute
getMaxBytesLocalOffHeapAsStringback to summary
public String getMaxBytesLocalOffHeapAsString()
Returns:String

Original input for maxBytesLocalOffHeap

Annotations
@ManagementAttribute
getNameback to summary
public String getName()

Gets the actual name of the cache manager.

Annotations
@ManagementAttribute
getSearchableback to summary
public boolean getSearchable()
Returns:boolean

if any contained caches are configured for search

Annotations
@ManagementAttribute
getStatusback to summary
public String getStatus()

Gets the status attribute of the Ehcache

Returns:String

The status value, as a String from the Status enum class

Annotations
@ManagementAttribute
getTransactionalback to summary
public boolean getTransactional()

Are any of the caches transactional

Annotations
@ManagementAttribute
See Also
net.sf.ehcache.config.CacheConfiguration.TransactionalMode
getTransactionCommitRateback to summary
public long getTransactionCommitRate()
Returns:long

aggregate Xa commit rate

getTransactionCommittedCountback to summary
public long getTransactionCommittedCount()

Get the committed transactions count

Returns:long

the committed transactions count

getTransactionRollbackRateback to summary
public long getTransactionRollbackRate()
Returns:long

aggregate Xa rollback rate

getTransactionRolledBackCountback to summary
public long getTransactionRolledBackCount()

Get the rolled back transactions count

Returns:long

the rolled back transactions count

getTransactionTimedOutCountback to summary
public 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:long

the timed out transactions count

getWriterMaxQueueSizeback to summary
public int getWriterMaxQueueSize()

Maximum elements that can be queued for processing by the write-behind writer

Returns:int

aggregate of the maximum elements that can be waiting to be processed by the write-behind writer across all caches

Annotations
@ManagementAttribute
getWriterQueueLengthback to summary
public long getWriterQueueLength()

Returns the total length of all write-behind queues across all caches

Returns:long

aggregate writer-behind queue length

isEnabledback to summary
public boolean isEnabled()

Returns if each cache is enabled.

Returns:boolean

boolean indicating that each cache is enabled

Annotations
@ManagementAttribute
setEnabledback to summary
public void setEnabled(boolean enabled)

Enables/disables each cache contained by this CacheManager

setMaxBytesLocalDiskback to summary
public void setMaxBytesLocalDisk(long maxBytes)
setMaxBytesLocalDiskAsStringback to summary
public void setMaxBytesLocalDiskAsString(String maxBytes)
setMaxBytesLocalHeapback to summary
public void setMaxBytesLocalHeap(long maxBytes)
setMaxBytesLocalHeapAsStringback to summary
public void setMaxBytesLocalHeapAsString(String maxBytes)
shutdownback to summary
public 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.