@MBean(objectName="Invalidation", description="Component responsible for invalidating entries on remote caches when entries are written to locally.") public class InvalidationInterceptor extends BaseRpcInterceptor implements JmxStatisticsExposer
The idea is that rather than replicating changes to all caches in a cluster when write methods are called, simply
broadcast an InvalidateCommand
on the remote caches containing all keys modified. This allows the remote
cache to look up the value in a shared cache loader which would have been updated with the changes.
Transactional caches, still lock affected keys on the primary owner:
componentRegistry, defaultSynchronous, rpcManager, trace
cacheConfiguration
Constructor and Description |
---|
InvalidationInterceptor() |
init, isLocalModeForced, isSynchronous, shouldInvokeRemoteTxCommand, transactionRemotelyPrepared
handleDefault, visitCommand, visitEntrySetCommand, visitEvictCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommand
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitRemoveExpiredCommand
protected Log getLog()
getLog
in class BaseRpcInterceptor
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
visitPutKeyValueCommand
in interface Visitor
visitPutKeyValueCommand
in class DDAsyncInterceptor
Throwable
public Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) throws Throwable
visitReplaceCommand
in interface Visitor
visitReplaceCommand
in class DDAsyncInterceptor
Throwable
public Object visitComputeCommand(InvocationContext ctx, ComputeCommand command) throws Throwable
visitComputeCommand
in interface Visitor
visitComputeCommand
in class DDAsyncInterceptor
Throwable
public Object visitComputeIfAbsentCommand(InvocationContext ctx, ComputeIfAbsentCommand command) throws Throwable
visitComputeIfAbsentCommand
in interface Visitor
visitComputeIfAbsentCommand
in class DDAsyncInterceptor
Throwable
public Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable
visitRemoveCommand
in interface Visitor
visitRemoveCommand
in class DDAsyncInterceptor
Throwable
public Object visitClearCommand(InvocationContext ctx, ClearCommand command) throws Throwable
visitClearCommand
in interface Visitor
visitClearCommand
in class DDAsyncInterceptor
Throwable
public Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command) throws Throwable
visitPutMapCommand
in interface Visitor
visitPutMapCommand
in class DDAsyncInterceptor
Throwable
public Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand command) throws Throwable
visitPrepareCommand
in interface Visitor
visitPrepareCommand
in class DDAsyncInterceptor
Throwable
public Object visitCommitCommand(TxInvocationContext ctx, CommitCommand command) throws Throwable
visitCommitCommand
in interface Visitor
visitCommitCommand
in class DDAsyncInterceptor
Throwable
public Object visitLockControlCommand(TxInvocationContext ctx, LockControlCommand command) throws Throwable
visitLockControlCommand
in interface Visitor
visitLockControlCommand
in class DDAsyncInterceptor
Throwable
@ManagedOperation(description="Resets statistics gathered by this component", displayName="Reset statistics") public void resetStatistics()
JmxStatisticsExposer
resetStatistics
in interface JmxStatisticsExposer
@ManagedAttribute(displayName="Statistics enabled", description="Enables or disables the gathering of statistics by this component", dataType=TRAIT, writable=true) public boolean getStatisticsEnabled()
JmxStatisticsExposer
getStatisticsEnabled
in interface JmxStatisticsExposer
public void setStatisticsEnabled(@Parameter(name="enabled",description="Whether statistics should be enabled or disabled (true/false)") boolean enabled)
JmxStatisticsExposer
setStatisticsEnabled
in interface JmxStatisticsExposer
enabled
- true if statistics should be captured@ManagedAttribute(description="Number of invalidations", displayName="Number of invalidations", measurementType=TRENDSUP) public long getInvalidations()
Copyright © 2021 JBoss by Red Hat. All rights reserved.