org.jboss.cache.interceptors
Class CacheMgmtInterceptor
java.lang.Object
org.jboss.cache.commands.AbstractVisitor
org.jboss.cache.interceptors.base.CommandInterceptor
org.jboss.cache.interceptors.base.JmxStatsCommandInterceptor
org.jboss.cache.interceptors.CacheMgmtInterceptor
- All Implemented Interfaces:
- Visitor, JmxStatisticsExposer
public class CacheMgmtInterceptor
- extends JmxStatsCommandInterceptor
Captures cache management statistics
- Version:
- $Id: CacheMgmtInterceptor.java 7654 2009-02-05 13:00:20Z manik.surtani@jboss.com $
- Author:
- Jerry Gauthier
| Methods inherited from class org.jboss.cache.commands.AbstractVisitor |
visitClearDataCommand, visitCollection, visitCommitCommand, visitCreateNodeCommand, visitExistsNodeCommand, visitGetChildrenNamesCommand, visitGetDataMapCommand, visitGetKeysCommand, visitGetNodeCommand, visitGravitateDataCommand, visitInvalidateCommand, visitMoveCommand, visitOptimisticPrepareCommand, visitPrepareCommand, visitRemoveKeyCommand, visitRemoveNodeCommand, visitRollbackCommand |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheMgmtInterceptor
public CacheMgmtInterceptor()
setDependencies
public void setDependencies(DataContainer dataContainer)
visitEvictFqnCommand
public Object visitEvictFqnCommand(InvocationContext ctx,
EvictCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a EvictCommand.
- Specified by:
visitEvictFqnCommand in interface Visitor- Overrides:
visitEvictFqnCommand in class AbstractVisitor
- Parameters:
ctx - invocation contextcommand - command to visit
- Returns:
- response from the visit
- Throws:
Throwable - in the event of problems.
visitGetKeyValueCommand
public Object visitGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a GetKeyValueCommand.
- Specified by:
visitGetKeyValueCommand in interface Visitor- Overrides:
visitGetKeyValueCommand in class AbstractVisitor
- Parameters:
ctx - invocation contextcommand - command to visit
- Returns:
- response from the visit
- Throws:
Throwable - in the event of problems.
visitPutDataMapCommand
public Object visitPutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a PutDataMapCommand.
- Specified by:
visitPutDataMapCommand in interface Visitor- Overrides:
visitPutDataMapCommand in class AbstractVisitor
- Parameters:
ctx - invocation contextcommand - command to visit
- Returns:
- response from the visit
- Throws:
Throwable - in the event of problems.
visitPutForExternalReadCommand
public Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a PutForExternalReadCommand.
- Specified by:
visitPutForExternalReadCommand in interface Visitor- Overrides:
visitPutForExternalReadCommand in class AbstractVisitor
- Parameters:
ctx - invocation contextcommand - command to visit
- Returns:
- response from the visit
- Throws:
Throwable - in the event of problems.
visitPutKeyValueCommand
public Object visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a PutKeyValueCommand.
- Specified by:
visitPutKeyValueCommand in interface Visitor- Overrides:
visitPutKeyValueCommand in class AbstractVisitor
- Parameters:
ctx - invocation contextcommand - command to visit
- Returns:
- response from the visit
- Throws:
Throwable - in the event of problems.
getHits
public long getHits()
getMisses
public long getMisses()
getStores
public long getStores()
getEvictions
public long getEvictions()
getHitMissRatio
public double getHitMissRatio()
getReadWriteRatio
public double getReadWriteRatio()
getAverageReadTime
public long getAverageReadTime()
getAverageWriteTime
public long getAverageWriteTime()
getNumberOfAttributes
public int getNumberOfAttributes()
getNumberOfNodes
public int getNumberOfNodes()
getElapsedTime
public long getElapsedTime()
getTimeSinceReset
public long getTimeSinceReset()
dumpStatistics
public Map<String,Object> dumpStatistics()
- Description copied from class:
JmxStatsCommandInterceptor
- Returns a map of statistics. This is a default implementation which returns an empty map and should be overridden
if it is to be meaningful.
- Specified by:
dumpStatistics in interface JmxStatisticsExposer- Overrides:
dumpStatistics in class JmxStatsCommandInterceptor
- Returns:
- an empty map
resetStatistics
public void resetStatistics()
- Description copied from class:
JmxStatsCommandInterceptor
- Resets statistics gathered. Is a no-op, and should be overridden if it is to be meaningful.
- Specified by:
resetStatistics in interface JmxStatisticsExposer- Overrides:
resetStatistics in class JmxStatsCommandInterceptor
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.