org.infinispan.interceptors
Class CacheLoaderInterceptor

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.CacheLoaderInterceptor
All Implemented Interfaces:
Visitor, JmxStatisticsExposer
Direct Known Subclasses:
ActivationInterceptor

public class CacheLoaderInterceptor
extends JmxStatsCommandInterceptor


Field Summary
protected  CacheLoaderManager clm
           
protected  CacheLoader loader
           
protected  CacheNotifier notifier
           
 
Fields inherited from class org.infinispan.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
CacheLoaderInterceptor()
           
 
Method Summary
 long getCacheLoaderLoads()
           
 long getCacheLoaderMisses()
           
protected  void injectDependencies(CacheLoaderManager clm, DataContainer dataContainer, EntryFactory entryFactory, CacheNotifier notifier)
           
 void resetStatistics()
          Resets statistics gathered.
protected  void sendNotification(Object key, boolean pre, InvocationContext ctx)
           
protected  void startInterceptor()
           
 Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command)
           
 Object visitInvalidateCommand(InvocationContext ctx, InvalidateCommand command)
           
 Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
           
 Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command)
           
 Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand 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
visitClearCommand, visitCollection, visitCommitCommand, visitEntrySetCommand, visitEvictCommand, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitPutMapCommand, visitRollbackCommand, visitSizeCommand, visitValuesCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clm

protected CacheLoaderManager clm

notifier

protected CacheNotifier notifier

loader

protected CacheLoader loader
Constructor Detail

CacheLoaderInterceptor

public CacheLoaderInterceptor()
Method Detail

injectDependencies

protected void injectDependencies(CacheLoaderManager clm,
                                  DataContainer dataContainer,
                                  EntryFactory entryFactory,
                                  CacheNotifier notifier)

startInterceptor

protected void startInterceptor()

visitPutKeyValueCommand

public Object visitPutKeyValueCommand(InvocationContext ctx,
                                      PutKeyValueCommand command)
                               throws Throwable
Specified by:
visitPutKeyValueCommand in interface Visitor
Overrides:
visitPutKeyValueCommand 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

visitInvalidateCommand

public Object visitInvalidateCommand(InvocationContext ctx,
                                     InvalidateCommand command)
                              throws Throwable
Specified by:
visitInvalidateCommand in interface Visitor
Overrides:
visitInvalidateCommand 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

visitReplaceCommand

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

sendNotification

protected void sendNotification(Object key,
                                boolean pre,
                                InvocationContext ctx)

getCacheLoaderLoads

public long getCacheLoaderLoads()

getCacheLoaderMisses

public long getCacheLoaderMisses()

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

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.