Class AbstractLockingInterceptor
- java.lang.Object
-
- org.infinispan.interceptors.BaseAsyncInterceptor
-
- org.infinispan.interceptors.DDAsyncInterceptor
-
- org.infinispan.interceptors.locking.AbstractLockingInterceptor
-
- All Implemented Interfaces:
org.infinispan.commands.Visitor,AsyncInterceptor
- Direct Known Subclasses:
AbstractTxLockingInterceptor,NonTransactionalLockingInterceptor
public abstract class AbstractLockingInterceptor extends DDAsyncInterceptor
Base class for various locking interceptors in this package.- Author:
- Mircea Markus
-
-
Field Summary
Fields Modifier and Type Field Description protected ClusteringDependentLogiccdlprotected booleaninvalidationModeprotected LockManagerlockManager-
Fields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
cacheConfiguration
-
-
Constructor Summary
Constructors Constructor Description AbstractLockingInterceptor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected longgetLockTimeoutMillis(org.infinispan.commands.FlagAffectedCommand command)protected abstract org.infinispan.util.logging.LoggetLog()protected abstract ObjecthandleReadManyCommand(InvocationContext ctx, org.infinispan.commands.FlagAffectedCommand command, Collection<?> keys)protected abstract <K> ObjecthandleWriteManyCommand(InvocationContext ctx, org.infinispan.commands.write.WriteCommand command, Collection<K> keys, boolean forwarded)protected KeyAwareLockPromiselockAndRecord(InvocationContext context, Object key, long timeout)voidstart()ObjectvisitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)ObjectvisitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command)ObjectvisitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command)protected abstract ObjectvisitDataReadCommand(InvocationContext ctx, org.infinispan.commands.DataCommand command)protected abstract ObjectvisitDataWriteCommand(InvocationContext ctx, org.infinispan.commands.write.DataWriteCommand command)ObjectvisitGetAllCommand(InvocationContext ctx, org.infinispan.commands.read.GetAllCommand command)ObjectvisitGetCacheEntryCommand(InvocationContext ctx, org.infinispan.commands.read.GetCacheEntryCommand command)ObjectvisitGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command)ObjectvisitInvalidateCommand(InvocationContext ctx, org.infinispan.commands.write.InvalidateCommand command)ObjectvisitInvalidateL1Command(InvocationContext ctx, org.infinispan.commands.write.InvalidateL1Command command)ObjectvisitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)ObjectvisitPutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)ObjectvisitReadOnlyKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadOnlyKeyCommand command)ObjectvisitReadOnlyManyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadOnlyManyCommand command)ObjectvisitReadWriteKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyCommand command)ObjectvisitReadWriteKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyValueCommand command)ObjectvisitReadWriteManyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyCommand command)ObjectvisitReadWriteManyEntriesCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyEntriesCommand command)ObjectvisitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command)ObjectvisitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command)ObjectvisitWriteOnlyKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyCommand command)ObjectvisitWriteOnlyKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyValueCommand command)ObjectvisitWriteOnlyManyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyCommand command)ObjectvisitWriteOnlyManyEntriesCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyEntriesCommand command)-
Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor
handleDefault, visitCommand, visitCommitCommand, visitDistributedExecuteCommand, visitEntrySetCommand, visitEvictCommand, visitGetKeysInGroupCommand, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand
-
Methods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrException
-
-
-
-
Field Detail
-
lockManager
protected LockManager lockManager
-
cdl
protected ClusteringDependentLogic cdl
-
invalidationMode
protected boolean invalidationMode
-
-
Method Detail
-
start
public void start()
-
getLog
protected abstract org.infinispan.util.logging.Log getLog()
-
visitClearCommand
public final Object visitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command) throws Throwable
- Specified by:
visitClearCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitClearCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitPutKeyValueCommand
public Object visitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command) throws Throwable
- Specified by:
visitPutKeyValueCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPutKeyValueCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReplaceCommand
public Object visitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command) throws Throwable
- Specified by:
visitReplaceCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReplaceCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitComputeCommand
public Object visitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command) throws Throwable
- Specified by:
visitComputeCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitComputeCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitComputeIfAbsentCommand
public Object visitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command) throws Throwable
- Specified by:
visitComputeIfAbsentCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitComputeIfAbsentCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitRemoveCommand
public Object visitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command) throws Throwable
- Specified by:
visitRemoveCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitRemoveCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitGetKeyValueCommand
public Object visitGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command) throws Throwable
- Specified by:
visitGetKeyValueCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitGetKeyValueCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitGetCacheEntryCommand
public Object visitGetCacheEntryCommand(InvocationContext ctx, org.infinispan.commands.read.GetCacheEntryCommand command) throws Throwable
- Specified by:
visitGetCacheEntryCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitGetCacheEntryCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitDataReadCommand
protected abstract Object visitDataReadCommand(InvocationContext ctx, org.infinispan.commands.DataCommand command) throws Throwable
- Throws:
Throwable
-
visitDataWriteCommand
protected abstract Object visitDataWriteCommand(InvocationContext ctx, org.infinispan.commands.write.DataWriteCommand command) throws Throwable
- Throws:
Throwable
-
visitInvalidateCommand
public final Object visitInvalidateCommand(InvocationContext ctx, org.infinispan.commands.write.InvalidateCommand command) throws Throwable
- Specified by:
visitInvalidateCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitInvalidateCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitInvalidateL1Command
public final Object visitInvalidateL1Command(InvocationContext ctx, org.infinispan.commands.write.InvalidateL1Command command) throws Throwable
- Specified by:
visitInvalidateL1Commandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitInvalidateL1Commandin classDDAsyncInterceptor- Throws:
Throwable
-
visitPutMapCommand
public Object visitPutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command) throws Throwable
- Specified by:
visitPutMapCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPutMapCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReadWriteKeyValueCommand
public Object visitReadWriteKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyValueCommand command) throws Throwable
- Specified by:
visitReadWriteKeyValueCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReadWriteKeyValueCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReadWriteKeyCommand
public Object visitReadWriteKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyCommand command) throws Throwable
- Specified by:
visitReadWriteKeyCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReadWriteKeyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitWriteOnlyKeyValueCommand
public Object visitWriteOnlyKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyValueCommand command) throws Throwable
- Specified by:
visitWriteOnlyKeyValueCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitWriteOnlyKeyValueCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitWriteOnlyKeyCommand
public Object visitWriteOnlyKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyCommand command) throws Throwable
- Specified by:
visitWriteOnlyKeyCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitWriteOnlyKeyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReadOnlyKeyCommand
public Object visitReadOnlyKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadOnlyKeyCommand command) throws Throwable
- Specified by:
visitReadOnlyKeyCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReadOnlyKeyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitWriteOnlyManyEntriesCommand
public Object visitWriteOnlyManyEntriesCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyEntriesCommand command) throws Throwable
- Specified by:
visitWriteOnlyManyEntriesCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitWriteOnlyManyEntriesCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitWriteOnlyManyCommand
public Object visitWriteOnlyManyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyCommand command) throws Throwable
- Specified by:
visitWriteOnlyManyCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitWriteOnlyManyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReadWriteManyCommand
public Object visitReadWriteManyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyCommand command) throws Throwable
- Specified by:
visitReadWriteManyCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReadWriteManyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReadWriteManyEntriesCommand
public Object visitReadWriteManyEntriesCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyEntriesCommand command) throws Throwable
- Specified by:
visitReadWriteManyEntriesCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReadWriteManyEntriesCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitGetAllCommand
public Object visitGetAllCommand(InvocationContext ctx, org.infinispan.commands.read.GetAllCommand command) throws Throwable
- Specified by:
visitGetAllCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitGetAllCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReadOnlyManyCommand
public Object visitReadOnlyManyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadOnlyManyCommand command) throws Throwable
- Specified by:
visitReadOnlyManyCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReadOnlyManyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
handleReadManyCommand
protected abstract Object handleReadManyCommand(InvocationContext ctx, org.infinispan.commands.FlagAffectedCommand command, Collection<?> keys) throws Throwable
- Throws:
Throwable
-
handleWriteManyCommand
protected abstract <K> Object handleWriteManyCommand(InvocationContext ctx, org.infinispan.commands.write.WriteCommand command, Collection<K> keys, boolean forwarded) throws Throwable
- Throws:
Throwable
-
getLockTimeoutMillis
protected final long getLockTimeoutMillis(org.infinispan.commands.FlagAffectedCommand command)
-
lockAndRecord
protected final KeyAwareLockPromise lockAndRecord(InvocationContext context, Object key, long timeout)
-
-