@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, tracecacheConfiguration| Constructor and Description |
|---|
InvalidationInterceptor() |
init, isLocalModeForced, isSynchronous, shouldInvokeRemoteTxCommand, transactionRemotelyPreparedhandleDefault, visitCommand, visitEntrySetCommand, visitEvictCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommandasyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvisitRemoveExpiredCommandprotected Log getLog()
getLog in class BaseRpcInterceptorpublic Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
visitPutKeyValueCommand in interface VisitorvisitPutKeyValueCommand in class DDAsyncInterceptorThrowablepublic Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) throws Throwable
visitReplaceCommand in interface VisitorvisitReplaceCommand in class DDAsyncInterceptorThrowablepublic Object visitComputeCommand(InvocationContext ctx, ComputeCommand command) throws Throwable
visitComputeCommand in interface VisitorvisitComputeCommand in class DDAsyncInterceptorThrowablepublic Object visitComputeIfAbsentCommand(InvocationContext ctx, ComputeIfAbsentCommand command) throws Throwable
visitComputeIfAbsentCommand in interface VisitorvisitComputeIfAbsentCommand in class DDAsyncInterceptorThrowablepublic Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable
visitRemoveCommand in interface VisitorvisitRemoveCommand in class DDAsyncInterceptorThrowablepublic Object visitClearCommand(InvocationContext ctx, ClearCommand command) throws Throwable
visitClearCommand in interface VisitorvisitClearCommand in class DDAsyncInterceptorThrowablepublic Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command) throws Throwable
visitPutMapCommand in interface VisitorvisitPutMapCommand in class DDAsyncInterceptorThrowablepublic Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand command) throws Throwable
visitPrepareCommand in interface VisitorvisitPrepareCommand in class DDAsyncInterceptorThrowablepublic Object visitCommitCommand(TxInvocationContext ctx, CommitCommand command) throws Throwable
visitCommitCommand in interface VisitorvisitCommitCommand in class DDAsyncInterceptorThrowablepublic Object visitLockControlCommand(TxInvocationContext ctx, LockControlCommand command) throws Throwable
visitLockControlCommand in interface VisitorvisitLockControlCommand in class DDAsyncInterceptorThrowable@ManagedOperation(description="Resets statistics gathered by this component",
displayName="Reset statistics")
public void resetStatistics()
JmxStatisticsExposerresetStatistics 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()
JmxStatisticsExposergetStatisticsEnabled in interface JmxStatisticsExposerpublic void setStatisticsEnabled(@Parameter(name="enabled",description="Whether statistics should be enabled or disabled (true/false)")
boolean enabled)
JmxStatisticsExposersetStatisticsEnabled in interface JmxStatisticsExposerenabled - true if statistics should be captured@ManagedAttribute(description="Number of invalidations",
displayName="Number of invalidations",
measurementType=TRENDSUP)
public long getInvalidations()
Copyright © 2022 JBoss by Red Hat. All rights reserved.