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, persistenceManager
cacheConfiguration
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, visitWriteOnlyManyEntriesCommand
getStatisticsEnabled, onStart, setStatisticsEnabled
handleDefault, visitCommand, visitEntrySetCommand, visitEvictCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand
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 CacheWriterInterceptor
protected void start()
start
in class CacheWriterInterceptor
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
visitPutKeyValueCommand
in interface Visitor
visitPutKeyValueCommand
in class CacheWriterInterceptor
Throwable
public Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command) throws Throwable
visitPutMapCommand
in interface Visitor
visitPutMapCommand
in class CacheWriterInterceptor
Throwable
protected Object handlePutMapCommandReturn(InvocationContext rCtx, PutMapCommand putMapCommand, Object rv)
handlePutMapCommandReturn
in class CacheWriterInterceptor
public Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable
visitRemoveCommand
in interface Visitor
visitRemoveCommand
in class CacheWriterInterceptor
Throwable
public Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) throws Throwable
visitReplaceCommand
in interface Visitor
visitReplaceCommand
in class CacheWriterInterceptor
Throwable
public Object visitComputeCommand(InvocationContext ctx, ComputeCommand command) throws Throwable
visitComputeCommand
in interface Visitor
visitComputeCommand
in class CacheWriterInterceptor
Throwable
public Object visitComputeIfAbsentCommand(InvocationContext ctx, ComputeIfAbsentCommand command) throws Throwable
visitComputeIfAbsentCommand
in interface Visitor
visitComputeIfAbsentCommand
in class CacheWriterInterceptor
Throwable
protected boolean skipSharedStores(InvocationContext ctx, Object key, FlagAffectedCommand command)
skipSharedStores
in class CacheWriterInterceptor
protected boolean isProperWriter(InvocationContext ctx, FlagAffectedCommand command, Object key)
isProperWriter
in class CacheWriterInterceptor
Copyright © 2021 JBoss by Red Hat. All rights reserved.