|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.cache.interceptors.Interceptor org.jboss.cache.interceptors.MethodDispacherInterceptor org.jboss.cache.interceptors.CacheMgmtInterceptor
public class CacheMgmtInterceptor
Captures cache management statistics
Field Summary |
---|
Fields inherited from class org.jboss.cache.interceptors.Interceptor |
---|
cache, configuration, last, log, next, trace |
Constructor Summary | |
---|---|
CacheMgmtInterceptor()
|
Method Summary | |
---|---|
Map<String,Object> |
dumpStatistics()
This implementation returns an empty Map. |
long |
getAverageReadTime()
Returns average milliseconds for an attribute read operation This includes both hits and misses. |
long |
getAverageWriteTime()
Returns average milliseconds for an attribute write operation |
long |
getElapsedTime()
Returns seconds since cache started |
long |
getEvictions()
Returns the number of cache eviction operations |
double |
getHitMissRatio()
Returns the hit/miss ratio for the cache This ratio is defined as hits/(hits + misses) |
long |
getHits()
Returns the number of cache attribute hits |
long |
getMisses()
Returns the number of cache attribute misses |
int |
getNumberOfAttributes()
|
int |
getNumberOfNodes()
|
double |
getReadWriteRatio()
Returns the read/write ratio for the cache This ratio is defined as (hits + misses)/stores |
long |
getStores()
Returns the number of cache attribute put operations |
long |
getTimeSinceReset()
Returns seconds since cache statistics reset If statistics haven't been reset, this will be the same as ElapsedTime |
protected Object |
handleEvictMethod(InvocationContext ctx,
Fqn fqn)
Handles evict() |
protected Object |
handleEvictVersionedNodeMethod(InvocationContext ctx,
Fqn fqn,
DataVersion dataVersion)
Handles CacheImpl._evict(org.jboss.cache.Fqn, org.jboss.cache.optimistic.DataVersion) |
protected Object |
handleGetKeyValueMethod(InvocationContext ctx,
Fqn fqn,
Object key,
boolean sendNodeEvent)
Handles CacheImpl._get(org.jboss.cache.Fqn, Object, boolean) |
protected Object |
handlePutDataEraseMethod(InvocationContext ctx,
GlobalTransaction gt,
Fqn fqn,
Map newData,
boolean createUndoOps,
boolean eraseContents)
Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, boolean) |
protected Object |
handlePutDataMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn fqn,
Map data,
boolean createUndoOps)
Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, java.util.Map, boolean) |
protected Object |
handlePutForExternalReadMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn fqn,
Object key,
Object value)
Handles CacheImpl._putForExternalRead(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object) |
protected Object |
handlePutKeyValueMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
Object key,
Object value,
boolean createUndoOps)
Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, Object, Object, boolean) |
void |
resetStatistics()
This implementation is a no-op. |
protected boolean |
skipMethodCall(InvocationContext ctx)
Each interceptor should extend this if it does not need any processing for current call. |
Methods inherited from class org.jboss.cache.interceptors.Interceptor |
---|
assertTransactionValid, getLast, getNext, getStatisticsEnabled, initLogger, isActive, isPreparing, isValid, nextInterceptor, peekNode, setCache, setLast, setNext, setStatisticsEnabled, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.cache.interceptors.InterceptorMBean |
---|
getStatisticsEnabled, setStatisticsEnabled |
Constructor Detail |
---|
public CacheMgmtInterceptor()
Method Detail |
---|
protected boolean skipMethodCall(InvocationContext ctx)
MethodDispacherInterceptor
skipMethodCall
in class MethodDispacherInterceptor
protected Object handleEvictMethod(InvocationContext ctx, Fqn fqn) throws Throwable
MethodDispacherInterceptor
handleEvictMethod
in class MethodDispacherInterceptor
Throwable
protected Object handleEvictVersionedNodeMethod(InvocationContext ctx, Fqn fqn, DataVersion dataVersion) throws Throwable
MethodDispacherInterceptor
CacheImpl._evict(org.jboss.cache.Fqn, org.jboss.cache.optimistic.DataVersion)
handleEvictVersionedNodeMethod
in class MethodDispacherInterceptor
Throwable
protected Object handleGetKeyValueMethod(InvocationContext ctx, Fqn fqn, Object key, boolean sendNodeEvent) throws Throwable
MethodDispacherInterceptor
CacheImpl._get(org.jboss.cache.Fqn, Object, boolean)
handleGetKeyValueMethod
in class MethodDispacherInterceptor
Throwable
protected Object handlePutDataMethod(InvocationContext ctx, GlobalTransaction tx, Fqn fqn, Map data, boolean createUndoOps) throws Throwable
MethodDispacherInterceptor
CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, java.util.Map, boolean)
handlePutDataMethod
in class MethodDispacherInterceptor
Throwable
protected Object handlePutDataEraseMethod(InvocationContext ctx, GlobalTransaction gt, Fqn fqn, Map newData, boolean createUndoOps, boolean eraseContents) throws Throwable
MethodDispacherInterceptor
CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, boolean)
handlePutDataEraseMethod
in class MethodDispacherInterceptor
Throwable
protected Object handlePutForExternalReadMethod(InvocationContext ctx, GlobalTransaction tx, Fqn fqn, Object key, Object value) throws Throwable
MethodDispacherInterceptor
CacheImpl._putForExternalRead(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object)
handlePutForExternalReadMethod
in class MethodDispacherInterceptor
Throwable
protected Object handlePutKeyValueMethod(InvocationContext ctx, GlobalTransaction gtx, Fqn fqn, Object key, Object value, boolean createUndoOps) throws Throwable
MethodDispacherInterceptor
CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, Object, Object, boolean)
handlePutKeyValueMethod
in class MethodDispacherInterceptor
Throwable
public long getHits()
CacheMgmtInterceptorMBean
getHits
in interface CacheMgmtInterceptorMBean
public long getMisses()
CacheMgmtInterceptorMBean
getMisses
in interface CacheMgmtInterceptorMBean
public long getStores()
CacheMgmtInterceptorMBean
getStores
in interface CacheMgmtInterceptorMBean
public long getEvictions()
CacheMgmtInterceptorMBean
getEvictions
in interface CacheMgmtInterceptorMBean
public double getHitMissRatio()
CacheMgmtInterceptorMBean
getHitMissRatio
in interface CacheMgmtInterceptorMBean
public double getReadWriteRatio()
CacheMgmtInterceptorMBean
getReadWriteRatio
in interface CacheMgmtInterceptorMBean
public long getAverageReadTime()
CacheMgmtInterceptorMBean
getAverageReadTime
in interface CacheMgmtInterceptorMBean
public long getAverageWriteTime()
CacheMgmtInterceptorMBean
getAverageWriteTime
in interface CacheMgmtInterceptorMBean
public int getNumberOfAttributes()
getNumberOfAttributes
in interface CacheMgmtInterceptorMBean
public int getNumberOfNodes()
getNumberOfNodes
in interface CacheMgmtInterceptorMBean
public long getElapsedTime()
CacheMgmtInterceptorMBean
getElapsedTime
in interface CacheMgmtInterceptorMBean
public long getTimeSinceReset()
CacheMgmtInterceptorMBean
getTimeSinceReset
in interface CacheMgmtInterceptorMBean
public Map<String,Object> dumpStatistics()
Interceptor
dumpStatistics
in interface InterceptorMBean
dumpStatistics
in class Interceptor
public void resetStatistics()
Interceptor
resetStatistics
in interface InterceptorMBean
resetStatistics
in class Interceptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |