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 ClusteringDependentLogic
cdl
protected boolean
invalidationMode
protected LockManager
lockManager
-
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 long
getLockTimeoutMillis(org.infinispan.commands.FlagAffectedCommand command)
protected abstract org.infinispan.util.logging.Log
getLog()
protected abstract Object
handleReadManyCommand(InvocationContext ctx, org.infinispan.commands.FlagAffectedCommand command, Collection<?> keys)
protected abstract <K> Object
handleWriteManyCommand(InvocationContext ctx, org.infinispan.commands.write.WriteCommand command, Collection<K> keys, boolean forwarded)
protected KeyAwareLockPromise
lockAndRecord(InvocationContext context, Object key, long timeout)
void
start()
Object
visitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)
Object
visitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command)
Object
visitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command)
protected abstract Object
visitDataReadCommand(InvocationContext ctx, org.infinispan.commands.DataCommand command)
protected abstract Object
visitDataWriteCommand(InvocationContext ctx, org.infinispan.commands.write.DataWriteCommand command)
Object
visitGetAllCommand(InvocationContext ctx, org.infinispan.commands.read.GetAllCommand command)
Object
visitGetCacheEntryCommand(InvocationContext ctx, org.infinispan.commands.read.GetCacheEntryCommand command)
Object
visitGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command)
Object
visitInvalidateCommand(InvocationContext ctx, org.infinispan.commands.write.InvalidateCommand command)
Object
visitInvalidateL1Command(InvocationContext ctx, org.infinispan.commands.write.InvalidateL1Command command)
Object
visitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)
Object
visitPutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)
Object
visitReadOnlyKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadOnlyKeyCommand command)
Object
visitReadOnlyManyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadOnlyManyCommand command)
Object
visitReadWriteKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyCommand command)
Object
visitReadWriteKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyValueCommand command)
Object
visitReadWriteManyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyCommand command)
Object
visitReadWriteManyEntriesCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyEntriesCommand command)
Object
visitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command)
Object
visitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command)
Object
visitWriteOnlyKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyCommand command)
Object
visitWriteOnlyKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyValueCommand command)
Object
visitWriteOnlyManyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyCommand command)
Object
visitWriteOnlyManyEntriesCommand(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:
visitClearCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitClearCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitPutKeyValueCommand
public Object visitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command) throws Throwable
- Specified by:
visitPutKeyValueCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitPutKeyValueCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitReplaceCommand
public Object visitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command) throws Throwable
- Specified by:
visitReplaceCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitReplaceCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitComputeCommand
public Object visitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command) throws Throwable
- Specified by:
visitComputeCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitComputeCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitComputeIfAbsentCommand
public Object visitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command) throws Throwable
- Specified by:
visitComputeIfAbsentCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitComputeIfAbsentCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitRemoveCommand
public Object visitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command) throws Throwable
- Specified by:
visitRemoveCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitRemoveCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitGetKeyValueCommand
public Object visitGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command) throws Throwable
- Specified by:
visitGetKeyValueCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitGetKeyValueCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitGetCacheEntryCommand
public Object visitGetCacheEntryCommand(InvocationContext ctx, org.infinispan.commands.read.GetCacheEntryCommand command) throws Throwable
- Specified by:
visitGetCacheEntryCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitGetCacheEntryCommand
in 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:
visitInvalidateCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitInvalidateCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitInvalidateL1Command
public final Object visitInvalidateL1Command(InvocationContext ctx, org.infinispan.commands.write.InvalidateL1Command command) throws Throwable
- Specified by:
visitInvalidateL1Command
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitInvalidateL1Command
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitPutMapCommand
public Object visitPutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command) throws Throwable
- Specified by:
visitPutMapCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitPutMapCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitReadWriteKeyValueCommand
public Object visitReadWriteKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyValueCommand command) throws Throwable
- Specified by:
visitReadWriteKeyValueCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitReadWriteKeyValueCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitReadWriteKeyCommand
public Object visitReadWriteKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyCommand command) throws Throwable
- Specified by:
visitReadWriteKeyCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitReadWriteKeyCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitWriteOnlyKeyValueCommand
public Object visitWriteOnlyKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyValueCommand command) throws Throwable
- Specified by:
visitWriteOnlyKeyValueCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitWriteOnlyKeyValueCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitWriteOnlyKeyCommand
public Object visitWriteOnlyKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyCommand command) throws Throwable
- Specified by:
visitWriteOnlyKeyCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitWriteOnlyKeyCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitReadOnlyKeyCommand
public Object visitReadOnlyKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadOnlyKeyCommand command) throws Throwable
- Specified by:
visitReadOnlyKeyCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitReadOnlyKeyCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitWriteOnlyManyEntriesCommand
public Object visitWriteOnlyManyEntriesCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyEntriesCommand command) throws Throwable
- Specified by:
visitWriteOnlyManyEntriesCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitWriteOnlyManyEntriesCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitWriteOnlyManyCommand
public Object visitWriteOnlyManyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyCommand command) throws Throwable
- Specified by:
visitWriteOnlyManyCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitWriteOnlyManyCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitReadWriteManyCommand
public Object visitReadWriteManyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyCommand command) throws Throwable
- Specified by:
visitReadWriteManyCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitReadWriteManyCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitReadWriteManyEntriesCommand
public Object visitReadWriteManyEntriesCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyEntriesCommand command) throws Throwable
- Specified by:
visitReadWriteManyEntriesCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitReadWriteManyEntriesCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitGetAllCommand
public Object visitGetAllCommand(InvocationContext ctx, org.infinispan.commands.read.GetAllCommand command) throws Throwable
- Specified by:
visitGetAllCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitGetAllCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitReadOnlyManyCommand
public Object visitReadOnlyManyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadOnlyManyCommand command) throws Throwable
- Specified by:
visitReadOnlyManyCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitReadOnlyManyCommand
in 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)
-
-