public class DistCacheWriterInterceptor extends CacheWriterInterceptor
If the cache store is shared, only the primary owner of the key writes to the cache store.
If the cache store is not shared, every owner of a key writes to the cache store.
In non-tx caches, if the originator is an owner, the command is executed there twice. The first time,
(isOriginLocal() == true) we don't write anything to the cache store; the second time,
the normal rules apply.
For clear operations, either only the originator of the command clears the cache store (if it is shared), or every node clears its cache store (if it is not shared). Note that in non-tx caches, this happens without holding a lock on the primary owner of all the keys.
handlePutMapCommandReturn, persistenceManagercacheConfiguration| Constructor and Description |
|---|
DistCacheWriterInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected Log |
getLog() |
protected Object |
handlePutMapCommandReturn(InvocationContext rCtx,
PutMapCommand putMapCommand,
Object rv) |
protected boolean |
isProperWriter(InvocationContext ctx,
FlagAffectedCommand command,
Object key) |
protected boolean |
skipSharedStores(InvocationContext ctx,
Object key,
FlagAffectedCommand command) |
protected void |
start() |
Object |
visitComputeCommand(InvocationContext ctx,
ComputeCommand command) |
Object |
visitComputeIfAbsentCommand(InvocationContext ctx,
ComputeIfAbsentCommand command) |
Object |
visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command) |
Object |
visitPutMapCommand(InvocationContext ctx,
PutMapCommand command) |
Object |
visitRemoveCommand(InvocationContext ctx,
RemoveCommand command) |
Object |
visitReplaceCommand(InvocationContext ctx,
ReplaceCommand command) |
commitCommand, getNumberOfPersistedEntries, getWritesToTheStores, isStoreEnabled, resetStatistics, store, visitClearCommand, visitCommitCommand, visitPrepareCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommandgetStatisticsEnabled, onStart, setStatisticsEnabledhandleDefault, visitCommand, visitEntrySetCommand, visitEvictCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommandasyncInvokeNext, 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 CacheWriterInterceptorprotected void start()
start in class CacheWriterInterceptorpublic Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
visitPutKeyValueCommand in interface VisitorvisitPutKeyValueCommand in class CacheWriterInterceptorThrowablepublic Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command) throws Throwable
visitPutMapCommand in interface VisitorvisitPutMapCommand in class CacheWriterInterceptorThrowableprotected Object handlePutMapCommandReturn(InvocationContext rCtx, PutMapCommand putMapCommand, Object rv)
handlePutMapCommandReturn in class CacheWriterInterceptorpublic Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable
visitRemoveCommand in interface VisitorvisitRemoveCommand in class CacheWriterInterceptorThrowablepublic Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) throws Throwable
visitReplaceCommand in interface VisitorvisitReplaceCommand in class CacheWriterInterceptorThrowablepublic Object visitComputeCommand(InvocationContext ctx, ComputeCommand command) throws Throwable
visitComputeCommand in interface VisitorvisitComputeCommand in class CacheWriterInterceptorThrowablepublic Object visitComputeIfAbsentCommand(InvocationContext ctx, ComputeIfAbsentCommand command) throws Throwable
visitComputeIfAbsentCommand in interface VisitorvisitComputeIfAbsentCommand in class CacheWriterInterceptorThrowableprotected boolean skipSharedStores(InvocationContext ctx, Object key, FlagAffectedCommand command)
skipSharedStores in class CacheWriterInterceptorprotected boolean isProperWriter(InvocationContext ctx, FlagAffectedCommand command, Object key)
isProperWriter in class CacheWriterInterceptorCopyright © 2022 JBoss by Red Hat. All rights reserved.