public class CacheLoaderInterceptor extends JmxStatsCommandInterceptor
Modifier and Type | Field and Description |
---|---|
protected CacheLoaderManager |
clm |
protected boolean |
enabled |
protected EntryFactory |
entryFactory |
protected CacheLoader |
loader |
protected CacheNotifier |
notifier |
cacheConfiguration
Constructor and Description |
---|
CacheLoaderInterceptor() |
checkStatisticsUsed, getStatisticsEnabled, setStatisticsEnabled
getLockAcquisitionTimeout, getNext, handleDefault, hasNext, hasSkipLocking, injectConfiguration, invokeNextInterceptor, setNext
visitClearCommand, visitCollection, visitCommitCommand, visitDistributedExecuteCommand, visitEntrySetCommand, visitEvictCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitPutMapCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand, visitValuesCommand
protected CacheLoaderManager clm
protected CacheNotifier notifier
protected CacheLoader loader
protected volatile boolean enabled
protected EntryFactory entryFactory
protected Log getLog()
getLog
in class CommandInterceptor
protected void injectDependencies(CacheLoaderManager clm, EntryFactory entryFactory, CacheNotifier notifier, DataContainer dataContainer)
protected void startInterceptor()
public Object visitApplyDeltaCommand(InvocationContext ctx, ApplyDeltaCommand command) throws Throwable
visitApplyDeltaCommand
in interface Visitor
visitApplyDeltaCommand
in class AbstractVisitor
Throwable
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
visitPutKeyValueCommand
in interface Visitor
visitPutKeyValueCommand
in class AbstractVisitor
Throwable
public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
visitGetKeyValueCommand
in interface Visitor
visitGetKeyValueCommand
in class AbstractVisitor
Throwable
public Object visitInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
visitInvalidateCommand
in interface Visitor
visitInvalidateCommand
in class AbstractVisitor
Throwable
public Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable
visitRemoveCommand
in interface Visitor
visitRemoveCommand
in class AbstractVisitor
Throwable
public Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) throws Throwable
visitReplaceCommand
in interface Visitor
visitReplaceCommand
in class AbstractVisitor
Throwable
protected boolean isDeltaWrite(Set<Flag> flags)
protected boolean canLoad(Object key)
protected final Boolean loadIfNeeded(InvocationContext ctx, Object key, boolean isRetrieval, FlagAffectedCommand cmd) throws Throwable
ctx
- The current invocation's contextkey
- The key for the entry to look upisRetrieval
- Whether or not this was called in the scope of a getcmd
- The command that was called that now wants to query the cache loaderThrowable
protected void sendNotification(Object key, Object value, boolean pre, InvocationContext ctx)
public long getCacheLoaderLoads()
public long getCacheLoaderMisses()
public void resetStatistics()
JmxStatsCommandInterceptor
resetStatistics
in interface JmxStatisticsExposer
resetStatistics
in class JmxStatsCommandInterceptor
public Collection<String> getCacheLoaders()
public void disableCacheLoader(String loaderType)
public void disableInterceptor()
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.