Interface RemoteLockCommand
- All Superinterfaces:
- ReplicableCommand,- TracedCommand
- All Known Subinterfaces:
- TransactionalRemoteLockCommand
Simple interface to extract all the keys that may need to be locked.
 
 A CacheRpcCommand that needs to acquire locks should implement this interface.
 This way, Infinispan tries to provide a better management to optimize the system resources usage.
- Since:
- 8.0
- Author:
- Pedro Ruivo
- 
Method SummaryModifier and TypeMethodDescriptionIt returns the lock owner of the key.Collection<?> It returns aCollectionwith the keys to be lock.booleanIt checks if this command should acquire locks.booleanMethods inherited from interface org.infinispan.commands.ReplicableCommandcanBlock, getCommandId, invoke, invokeAsync, isReturnValueExpected, isSuccessful, logThrowable, readFrom, setOrigin, writeToMethods inherited from interface org.infinispan.commands.TracedCommandgetOperationName, getSpanAttributes, setSpanAttributes
- 
Method Details- 
getKeysToLockCollection<?> getKeysToLock()It returns aCollectionwith the keys to be lock.It may return an empty collection if no keys needs to be locked independently of the return value of hasSkipLocking(). It may contains duplicated keys andnullis not a valid return value.- Returns:
- a Collectionof keys to lock.
 
- 
getKeyLockOwnerObject getKeyLockOwner()It returns the lock owner of the key.Usually, in transaction caches it is the GlobalTransactionand in non-transactional caches theCommandInvocationId.- Returns:
- the lock owner of the key.
 
- 
hasZeroLockAcquisitionboolean hasZeroLockAcquisition()- Returns:
- it the locks should be acquire with 0 (zero) acquisition timeout.
 
- 
hasSkipLockingboolean hasSkipLocking()It checks if this command should acquire locks.- Returns:
- trueif locks should be acquired for the keys in- getKeysToLock().
 
 
-