|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.ehcache.constructs.EhcacheDecoratorAdapter
com.yammer.metrics.ehcache.InstrumentedEhcache
public class InstrumentedEhcache
An instrumented Ehcache instance.
| Field Summary |
|---|
| Fields inherited from class net.sf.ehcache.constructs.EhcacheDecoratorAdapter |
|---|
underlyingCache |
| Method Summary | |
|---|---|
net.sf.ehcache.Element |
get(Object key)
|
net.sf.ehcache.Element |
get(Serializable key)
|
static net.sf.ehcache.Ehcache |
instrument(net.sf.ehcache.Ehcache cache)
Instruments the given Ehcache instance with get and put timers
and a set of gauges for Ehcache's built-in statistics:
hits
The number of times a requested item was found in the
cache.
in-memory-hits
Number of times a requested item was found in the memory
store.
off-heap-hits
Number of times a requested item was found in the off-heap
store.
on-disk-hits
Number of times a requested item was found in the disk
store.
misses
Number of times a requested item was not found in the
cache.
in-memory-misses
Number of times a requested item was not found in the memory
store.
off-heap-misses
Number of times a requested item was not found in the
off-heap store.
on-disk-misses
Number of times a requested item was not found in the disk
store.
objects
Number of elements stored in the cache.
in-memory-objects
Number of objects in the memory store.
off-heap-objects
Number of objects in the off-heap store.
on-disk-objects
Number of objects in the disk store.
mean-get-time
The average get time. |
void |
put(net.sf.ehcache.Element element)
|
void |
put(net.sf.ehcache.Element element,
boolean doNotNotifyCacheReplicators)
|
net.sf.ehcache.Element |
putIfAbsent(net.sf.ehcache.Element element)
|
| Methods inherited from class net.sf.ehcache.constructs.EhcacheDecoratorAdapter |
|---|
acquireReadLockOnKey, acquireWriteLockOnKey, addPropertyChangeListener, bootstrap, calculateInMemorySize, calculateOffHeapSize, calculateOnDiskSize, clearStatistics, clone, createQuery, disableDynamicFeatures, dispose, evictExpiredElements, flush, getAll, getAllWithLoader, getAverageGetTime, getAverageSearchTime, getBootstrapCacheLoader, getCacheConfiguration, getCacheEventNotificationService, getCacheExceptionHandler, getCacheManager, getDiskStoreSize, getGuid, getInternalContext, getKeys, getKeysNoDuplicateCheck, getKeysWithExpiryCheck, getLiveCacheStatistics, getMemoryStoreSize, getName, getOffHeapStoreSize, getQuiet, getQuiet, getRegisteredCacheExtensions, getRegisteredCacheLoaders, getRegisteredCacheWriter, getSampledCacheStatistics, getSearchAttribute, getSearchesPerSecond, getSize, getSizeBasedOnAccuracy, getStatistics, getStatisticsAccuracy, getStatus, getWithLoader, getWriterManager, hasAbortedSizeOf, initialise, isClusterBulkLoadEnabled, isClusterCoherent, isDisabled, isElementInMemory, isElementInMemory, isElementOnDisk, isElementOnDisk, isExpired, isKeyInCache, isNodeBulkLoadEnabled, isNodeCoherent, isPinned, isReadLockedByCurrentThread, isSampledStatisticsEnabled, isSearchable, isStatisticsEnabled, isValueInCache, isWriteLockedByCurrentThread, load, loadAll, putAll, putQuiet, putWithWriter, recalculateSize, registerCacheExtension, registerCacheLoader, registerCacheUsageListener, registerCacheWriter, releaseReadLockOnKey, releaseWriteLockOnKey, remove, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAndReturnElement, removeCacheUsageListener, removeElement, removePropertyChangeListener, removeQuiet, removeQuiet, removeWithWriter, replace, replace, setBootstrapCacheLoader, setCacheExceptionHandler, setCacheManager, setDisabled, setDiskStorePath, setName, setNodeBulkLoadEnabled, setNodeCoherent, setPinned, setSampledStatisticsEnabled, setStatisticsAccuracy, setStatisticsEnabled, setTransactionManagerLookup, toString, tryReadLockOnKey, tryWriteLockOnKey, unpinAll, unregisterCacheExtension, unregisterCacheLoader, unregisterCacheWriter, waitUntilClusterBulkLoadComplete, waitUntilClusterCoherent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static net.sf.ehcache.Ehcache instrument(net.sf.ehcache.Ehcache cache)
Ehcache instance with get and put timers
and a set of gauges for Ehcache's built-in statistics:
hits |
The number of times a requested item was found in the cache. |
in-memory-hits |
Number of times a requested item was found in the memory store. |
off-heap-hits |
Number of times a requested item was found in the off-heap store. |
on-disk-hits |
Number of times a requested item was found in the disk store. |
misses |
Number of times a requested item was not found in the cache. |
in-memory-misses |
Number of times a requested item was not found in the memory store. |
off-heap-misses |
Number of times a requested item was not found in the off-heap store. |
on-disk-misses |
Number of times a requested item was not found in the disk store. |
objects |
Number of elements stored in the cache. |
in-memory-objects |
Number of objects in the memory store. |
off-heap-objects |
Number of objects in the off-heap store. |
on-disk-objects |
Number of objects in the disk store. |
mean-get-time |
The average get time. Because ehcache support JDK1.4.2, each
get time uses System.currentTimeMillis(), rather than
nanoseconds. The accuracy is thus limited. |
mean-search-time |
The average execution time (in milliseconds) within the last sample period. |
eviction-count |
The number of cache evictions, since the cache was created, or statistics were cleared. |
searches-per-second |
The number of search executions that have completed in the last second. |
accuracy |
A human readable description of the accuracy setting. One of "None", "Best Effort" or "Guaranteed". |
cache - an Ehcache instance
cacheStatistics
public net.sf.ehcache.Element get(Object key)
throws IllegalStateException,
net.sf.ehcache.CacheException
get in interface net.sf.ehcache.Ehcacheget in class net.sf.ehcache.constructs.EhcacheDecoratorAdapterIllegalStateException
net.sf.ehcache.CacheException
public net.sf.ehcache.Element get(Serializable key)
throws IllegalStateException,
net.sf.ehcache.CacheException
get in interface net.sf.ehcache.Ehcacheget in class net.sf.ehcache.constructs.EhcacheDecoratorAdapterIllegalStateException
net.sf.ehcache.CacheException
public void put(net.sf.ehcache.Element element)
throws IllegalArgumentException,
IllegalStateException,
net.sf.ehcache.CacheException
put in interface net.sf.ehcache.Ehcacheput in class net.sf.ehcache.constructs.EhcacheDecoratorAdapterIllegalArgumentException
IllegalStateException
net.sf.ehcache.CacheException
public void put(net.sf.ehcache.Element element,
boolean doNotNotifyCacheReplicators)
throws IllegalArgumentException,
IllegalStateException,
net.sf.ehcache.CacheException
put in interface net.sf.ehcache.Ehcacheput in class net.sf.ehcache.constructs.EhcacheDecoratorAdapterIllegalArgumentException
IllegalStateException
net.sf.ehcache.CacheException
public net.sf.ehcache.Element putIfAbsent(net.sf.ehcache.Element element)
throws NullPointerException
putIfAbsent in interface net.sf.ehcache.EhcacheputIfAbsent in class net.sf.ehcache.constructs.EhcacheDecoratorAdapterNullPointerException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||