Package org.infinispan.interceptors.impl
Class DistCacheWriterInterceptor
java.lang.Object
org.infinispan.interceptors.BaseAsyncInterceptor
org.infinispan.interceptors.DDAsyncInterceptor
org.infinispan.interceptors.impl.JmxStatsCommandInterceptor
org.infinispan.interceptors.impl.CacheWriterInterceptor
org.infinispan.interceptors.impl.DistCacheWriterInterceptor
- All Implemented Interfaces:
Visitor,AsyncInterceptor,JmxStatisticsExposer
Cache store interceptor specific for the distribution and replication cache modes.
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.
- Since:
- 9.0
- Author:
- Galder ZamarreƱo, Dan Berindei
-
Field Summary
Fields inherited from class org.infinispan.interceptors.impl.CacheWriterInterceptor
handlePutMapCommandReturn, persistenceManagerFields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
cacheConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LoggetLog()protected ObjecthandlePutMapCommandReturn(InvocationContext rCtx, PutMapCommand putMapCommand, Object rv) protected booleanisProperWriter(InvocationContext ctx, FlagAffectedCommand command, Object key) protected booleanskipSharedStores(InvocationContext ctx, Object key, FlagAffectedCommand command) protected voidstart()visitComputeCommand(InvocationContext ctx, ComputeCommand command) visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) visitPutMapCommand(InvocationContext ctx, PutMapCommand command) visitRemoveCommand(InvocationContext ctx, RemoveCommand command) visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) Methods inherited from class org.infinispan.interceptors.impl.CacheWriterInterceptor
commitModifications, getNumberOfPersistedEntries, getWritesToTheStores, isStoreEnabled, resetStatistics, store, visitClearCommand, visitCommitCommand, visitPrepareCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommandMethods inherited from class org.infinispan.interceptors.impl.JmxStatsCommandInterceptor
getStatisticsEnabled, onStart, setStatisticsEnabledMethods inherited from class org.infinispan.interceptors.DDAsyncInterceptor
handleDefault, visitCommand, visitEntrySetCommand, visitEvictCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitRollbackCommand, visitSizeCommand, visitTouchCommand, visitUnknownCommandMethods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.commands.Visitor
visitRemoveExpiredCommand
-
Constructor Details
-
DistCacheWriterInterceptor
public DistCacheWriterInterceptor()
-
-
Method Details
-
getLog
- Overrides:
getLogin classCacheWriterInterceptor
-
start
protected void start()- Overrides:
startin classCacheWriterInterceptor
-
visitPutKeyValueCommand
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable - Specified by:
visitPutKeyValueCommandin interfaceVisitor- Overrides:
visitPutKeyValueCommandin classCacheWriterInterceptor- Throws:
Throwable
-
visitIracPutKeyValueCommand
- Specified by:
visitIracPutKeyValueCommandin interfaceVisitor- Overrides:
visitIracPutKeyValueCommandin classCacheWriterInterceptor
-
visitPutMapCommand
- Specified by:
visitPutMapCommandin interfaceVisitor- Overrides:
visitPutMapCommandin classCacheWriterInterceptor- Throws:
Throwable
-
handlePutMapCommandReturn
protected Object handlePutMapCommandReturn(InvocationContext rCtx, PutMapCommand putMapCommand, Object rv) - Overrides:
handlePutMapCommandReturnin classCacheWriterInterceptor
-
visitRemoveCommand
- Specified by:
visitRemoveCommandin interfaceVisitor- Overrides:
visitRemoveCommandin classCacheWriterInterceptor- Throws:
Throwable
-
visitReplaceCommand
- Specified by:
visitReplaceCommandin interfaceVisitor- Overrides:
visitReplaceCommandin classCacheWriterInterceptor- Throws:
Throwable
-
visitComputeCommand
- Specified by:
visitComputeCommandin interfaceVisitor- Overrides:
visitComputeCommandin classCacheWriterInterceptor- Throws:
Throwable
-
visitComputeIfAbsentCommand
public Object visitComputeIfAbsentCommand(InvocationContext ctx, ComputeIfAbsentCommand command) throws Throwable - Specified by:
visitComputeIfAbsentCommandin interfaceVisitor- Overrides:
visitComputeIfAbsentCommandin classCacheWriterInterceptor- Throws:
Throwable
-
isProperWriter
- Overrides:
isProperWriterin classCacheWriterInterceptor
-