Class InvalidateL1Command
java.lang.Object
org.infinispan.commands.AbstractFlagAffectedCommand
org.infinispan.commands.AbstractTopologyAffectedCommand
org.infinispan.commands.write.InvalidateCommand
org.infinispan.commands.write.InvalidateL1Command
- All Implemented Interfaces:
FlagAffectedCommand, CacheRpcCommand, ReplicableCommand, TopologyAffectedCommand, TracedCommand, VisitableCommand, WriteCommand, VersionAware, RemoteLockCommand
Invalidates an entry in a L1 cache (used with DIST mode)
- Since:
- 4.0
- Author:
- Manik Surtani, Mircea.Markus@jboss.com
-
Nested Class Summary
Nested classes/interfaces inherited from interface VisitableCommand
VisitableCommand.LoadType -
Field Summary
Fields inherited from class InvalidateCommand
commandInvocationId, keysFields inherited from class AbstractTopologyAffectedCommand
topologyIdFields inherited from class AbstractFlagAffectedCommand
cacheName, flags, origin, spanAttributesFields inherited from interface VisitableCommand
log -
Constructor Summary
ConstructorsConstructorDescriptionInvalidateL1Command(ByteString cacheName, Address writeOrigin, long flagsBitSet, Collection<Object> keys, CommandInvocationId commandInvocationId) -
Method Summary
Modifier and TypeMethodDescriptionacceptVisitor(InvocationContext ctx, Visitor visitor) Accept a visitor, and return the result of accepting this visitor.Collection<?> It returns aCollectionwith the keys to be lock.booleanisCausedByALocalWrite(Address address) Returns true if the write that caused the invalidation was performed on this node.voidReturns aNodeVersionrepresenting the Infinispan version in which this command was added.toString()Methods inherited from class InvalidateCommand
equals, fail, getAffectedKeys, getCommandInvocationId, getInternalMetadata, getKeyLockOwner, getKeys, getValueMatcher, getWrappedKeys, hashCode, hasSkipLocking, hasZeroLockAcquisition, isConditional, isReturnValueExpected, isSuccessful, loadType, setInternalMetadata, setValueMatcherMethods inherited from class AbstractTopologyAffectedCommand
getTopologyId, setTopologyIdMethods inherited from class AbstractFlagAffectedCommand
getCacheName, getFlagsBitSet, getFlagsWithoutRemote, getOrigin, getSpanAttributes, hasSameFlags, printFlags, setFlagsBitSet, setOrigin, setSpanAttributesMethods inherited from interface CacheRpcCommand
getCacheName, getOrigin, setOriginMethods inherited from interface FlagAffectedCommand
addFlags, getFlags, getFlagsBitSet, hasAllFlags, hasAnyFlag, setFlagsBitSetMethods inherited from interface ReplicableCommand
getCommandId, logThrowable, readFrom, writeToMethods inherited from interface TopologyAffectedCommand
getTopologyId, setTopologyIdMethods inherited from interface TracedCommand
getOperationName, getSpanAttributes, setSpanAttributesMethods inherited from interface VisitableCommand
init, invokeAsyncMethods inherited from interface WriteCommand
isWriteOnly, shouldReplicate
-
Constructor Details
-
InvalidateL1Command
public InvalidateL1Command(ByteString cacheName, Address writeOrigin, long flagsBitSet, Collection<Object> keys, CommandInvocationId commandInvocationId)
-
-
Method Details
-
setKeys
-
getKeysToLock
Description copied from interface:RemoteLockCommandIt 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
RemoteLockCommand.hasSkipLocking(). It may contains duplicated keys andnullis not a valid return value.- Specified by:
getKeysToLockin interfaceRemoteLockCommand- Overrides:
getKeysToLockin classInvalidateCommand- Returns:
- a
Collectionof keys to lock.
-
acceptVisitor
Description copied from interface:VisitableCommandAccept a visitor, and return the result of accepting this visitor.- Specified by:
acceptVisitorin interfaceVisitableCommand- Overrides:
acceptVisitorin classInvalidateCommand- Parameters:
ctx- invocation contextvisitor- visitor to accept- Returns:
- arbitrary return value
- Throws:
Throwable- in the event of problems
-
supportedSince
Description copied from interface:ReplicableCommandReturns aNodeVersionrepresenting the Infinispan version in which this command was added. This value is used to ensure that when the cluster contains different Infinispan versions, only commands compatible with the oldest version are transmitted.Abstract classes should not implement this method as the version should be specific to an individual implementation. Similarly, implementations which extend another
ReplicableCommandshould always override this method.- Specified by:
supportedSincein interfaceReplicableCommand- Specified by:
supportedSincein interfaceVersionAware- Overrides:
supportedSincein classInvalidateCommand- Returns:
- a
NodeVersioncorresponding to the Infinispan version this command was added.
-
toString
- Overrides:
toStringin classInvalidateCommand
-
isCausedByALocalWrite
Returns true if the write that caused the invalidation was performed on this node. More formal, if a put(k) happens on node A and ch(A)={B}, then an invalidation message might be multicasted by B to all cluster members including A. This method returns true if and only if the node where it is invoked is A.
-