org.infinispan.interceptors
Class CacheMgmtInterceptor

java.lang.Object
  extended by org.infinispan.commands.AbstractVisitor
      extended by org.infinispan.interceptors.base.CommandInterceptor
          extended by org.infinispan.interceptors.base.JmxStatsCommandInterceptor
              extended by org.infinispan.interceptors.CacheMgmtInterceptor
All Implemented Interfaces:
Visitor, JmxStatisticsExposer

public class CacheMgmtInterceptor
extends JmxStatsCommandInterceptor

Captures cache management statistics

Since:
4.0
Author:
Jerry Gauthier

Field Summary
 
Fields inherited from class org.infinispan.interceptors.base.CommandInterceptor
configuration
 
Constructor Summary
CacheMgmtInterceptor()
           
 
Method Summary
 long getAverageReadTime()
           
 long getAverageWriteTime()
           
 long getElapsedTime()
           
 long getEvictions()
           
 double getHitRatio()
           
 long getHits()
           
protected  Log getLog()
           
 long getMisses()
           
 int getNumberOfEntries()
           
 double getReadWriteRatio()
           
 long getRemoveHits()
           
 long getRemoveMisses()
           
 long getStores()
           
 long getTimeSinceReset()
           
 void resetStatistics()
          Resets statistics gathered.
 void setDependencies(DataContainer dataContainer)
           
 Object visitEvictCommand(InvocationContext ctx, EvictCommand command)
           
 Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command)
           
 Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
           
 Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command)
           
 Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command)
           
 
Methods inherited from class org.infinispan.interceptors.base.JmxStatsCommandInterceptor
checkStatisticsUsed, getStatisticsEnabled, setStatisticsEnabled
 
Methods inherited from class org.infinispan.interceptors.base.CommandInterceptor
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.infinispan.commands.AbstractVisitor
visitApplyDeltaCommand, visitClearCommand, visitCollection, visitCommitCommand, visitDistributedExecuteCommand, visitEntrySetCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitReplaceCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand, visitValuesCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheMgmtInterceptor

public CacheMgmtInterceptor()
Method Detail

getLog

protected Log getLog()
Overrides:
getLog in class CommandInterceptor

setDependencies

public void setDependencies(DataContainer dataContainer)

visitEvictCommand

public Object visitEvictCommand(InvocationContext ctx,
                                EvictCommand command)
                         throws Throwable
Specified by:
visitEvictCommand in interface Visitor
Overrides:
visitEvictCommand in class AbstractVisitor
Throws:
Throwable

visitGetKeyValueCommand

public Object visitGetKeyValueCommand(InvocationContext ctx,
                                      GetKeyValueCommand command)
                               throws Throwable
Specified by:
visitGetKeyValueCommand in interface Visitor
Overrides:
visitGetKeyValueCommand in class AbstractVisitor
Throws:
Throwable

visitPutMapCommand

public Object visitPutMapCommand(InvocationContext ctx,
                                 PutMapCommand command)
                          throws Throwable
Specified by:
visitPutMapCommand in interface Visitor
Overrides:
visitPutMapCommand in class AbstractVisitor
Throws:
Throwable

visitPutKeyValueCommand

public Object visitPutKeyValueCommand(InvocationContext ctx,
                                      PutKeyValueCommand command)
                               throws Throwable
Specified by:
visitPutKeyValueCommand in interface Visitor
Overrides:
visitPutKeyValueCommand in class AbstractVisitor
Throws:
Throwable

visitRemoveCommand

public Object visitRemoveCommand(InvocationContext ctx,
                                 RemoveCommand command)
                          throws Throwable
Specified by:
visitRemoveCommand in interface Visitor
Overrides:
visitRemoveCommand in class AbstractVisitor
Throws:
Throwable

getHits

public long getHits()

getMisses

public long getMisses()

getRemoveHits

public long getRemoveHits()

getRemoveMisses

public long getRemoveMisses()

getStores

public long getStores()

getEvictions

public long getEvictions()

getHitRatio

public double getHitRatio()

getReadWriteRatio

public double getReadWriteRatio()

getAverageReadTime

public long getAverageReadTime()

getAverageWriteTime

public long getAverageWriteTime()

getNumberOfEntries

public int getNumberOfEntries()

getElapsedTime

public long getElapsedTime()

getTimeSinceReset

public long getTimeSinceReset()

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 © 2012 JBoss, a division of Red Hat. All Rights Reserved.