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 |
void |
disableCacheLoader(String loaderType)
|
void |
disableInterceptor()
|
protected boolean |
forceLoad(Object key,
Set<Flag> flags)
|
long |
getCacheLoaderLoads()
|
long |
getCacheLoaderMisses()
|
Collection<String> |
getCacheLoaders()
|
protected Log |
getLog()
|
protected void |
injectDependencies(CacheLoaderManager clm,
EntryFactory entryFactory,
CacheNotifier notifier)
|
protected boolean |
isDeltaWrite(Set<Flag> flags)
Indicates whether the operation is a delta write. |
void |
resetStatistics()
Resets statistics gathered. |
protected void |
sendNotification(Object key,
Object value,
boolean pre,
InvocationContext ctx,
FlagAffectedCommand cmd)
|
protected void |
startInterceptor()
|
Object |
visitApplyDeltaCommand(InvocationContext ctx,
ApplyDeltaCommand command)
|
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 |
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
enabled
protected volatile boolean enabled
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()
visitApplyDeltaCommand
public Object visitApplyDeltaCommand(InvocationContext ctx,
ApplyDeltaCommand command)
throws Throwable
- Specified by:
visitApplyDeltaCommand
in interface Visitor
- Overrides:
visitApplyDeltaCommand
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
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)
isDeltaWrite
protected boolean isDeltaWrite(Set<Flag> flags)
- Indicates whether the operation is a delta write. If it is, the
previous value needs to be loaded from the cache store so that
it can be merged.
sendNotification
protected void sendNotification(Object key,
Object value,
boolean pre,
InvocationContext ctx,
FlagAffectedCommand cmd)
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
getCacheLoaders
public Collection<String> getCacheLoaders()
disableCacheLoader
public void disableCacheLoader(String loaderType)
disableInterceptor
public void disableInterceptor()
Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.