org.infinispan.interceptors
Class CacheLoaderInterceptor
java.lang.Object
org.infinispan.commands.AbstractVisitor
org.infinispan.interceptors.base.CommandInterceptor
org.infinispan.interceptors.base.JmxStatsCommandInterceptor
org.infinispan.interceptors.CacheLoaderInterceptor
- All Implemented Interfaces:
- Visitor, JmxStatisticsExposer
- Direct Known Subclasses:
- ActivationInterceptor, ClusteredCacheLoaderInterceptor
public class CacheLoaderInterceptor
- extends JmxStatsCommandInterceptor
Method Summary |
protected boolean |
forceLoad(Object key,
Set<Flag> flags)
|
long |
getCacheLoaderLoads()
|
long |
getCacheLoaderMisses()
|
protected Log |
getLog()
|
protected void |
injectDependencies(CacheLoaderManager clm,
EntryFactory entryFactory,
CacheNotifier notifier)
|
void |
resetStatistics()
Resets statistics gathered. |
protected void |
sendNotification(Object key,
Object value,
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.commands.AbstractVisitor |
visitApplyDeltaCommand, visitClearCommand, visitCollection, visitCommitCommand, visitDistributedExecuteCommand, visitEntrySetCommand, visitEvictCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitPutMapCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand, visitValuesCommand |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
clm
protected CacheLoaderManager clm
notifier
protected CacheNotifier notifier
loader
protected CacheLoader loader
CacheLoaderInterceptor
public CacheLoaderInterceptor()
getLog
protected Log getLog()
- Overrides:
getLog
in class CommandInterceptor
injectDependencies
protected void injectDependencies(CacheLoaderManager clm,
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
forceLoad
protected boolean forceLoad(Object key,
Set<Flag> flags)
sendNotification
protected void sendNotification(Object key,
Object value,
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
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.