Package org.infinispan.commands.write
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,ReplicableCommand,TopologyAffectedCommand,TracedCommand,VisitableCommand,WriteCommand,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 org.infinispan.commands.VisitableCommand
VisitableCommand.LoadType -
Field Summary
FieldsFields inherited from class org.infinispan.commands.write.InvalidateCommand
commandInvocationId, keys -
Constructor Summary
ConstructorsConstructorDescriptionInvalidateL1Command(long flagsBitSet, Collection<Object> keys, CommandInvocationId commandInvocationId) InvalidateL1Command(long flagsBitSet, CommandInvocationId commandInvocationId, Object... keys) InvalidateL1Command(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.byteUsed by marshallers to convert this command into an id for streaming.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.voidreadFrom(ObjectInput input) Reads this instance from the stream written byReplicableCommand.writeTo(ObjectOutput).voidtoString()voidwriteTo(ObjectOutput output) Writes this instance to theObjectOutput.Methods inherited from class org.infinispan.commands.write.InvalidateCommand
equals, fail, getAffectedKeys, getCommandInvocationId, getInternalMetadata, getKeyLockOwner, getKeys, getValueMatcher, hashCode, hasSkipLocking, hasZeroLockAcquisition, isConditional, isReturnValueExpected, isSuccessful, loadType, setInternalMetadata, setValueMatcherMethods inherited from class org.infinispan.commands.AbstractTopologyAffectedCommand
getTopologyId, setTopologyIdMethods inherited from class org.infinispan.commands.AbstractFlagAffectedCommand
getFlagsBitSet, hasSameFlags, printFlags, setFlagsBitSetMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.commands.FlagAffectedCommand
addFlags, getFlags, getFlagsBitSet, hasAllFlags, hasAnyFlag, setFlagsBitSetMethods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, invoke, invokeAsync, logThrowable, setOriginMethods inherited from interface org.infinispan.commands.TopologyAffectedCommand
getTopologyId, setTopologyIdMethods inherited from interface org.infinispan.commands.TracedCommand
getOperationName, getSpanAttributes, setSpanAttributesMethods inherited from interface org.infinispan.commands.VisitableCommand
initMethods inherited from interface org.infinispan.commands.write.WriteCommand
isWriteOnly, shouldReplicate
-
Field Details
-
COMMAND_ID
public static final int COMMAND_ID- See Also:
-
-
Constructor Details
-
InvalidateL1Command
public InvalidateL1Command() -
InvalidateL1Command
public InvalidateL1Command(long flagsBitSet, CommandInvocationId commandInvocationId, Object... keys) -
InvalidateL1Command
public InvalidateL1Command(long flagsBitSet, Collection<Object> keys, CommandInvocationId commandInvocationId) -
InvalidateL1Command
public InvalidateL1Command(Address writeOrigin, long flagsBitSet, Collection<Object> keys, CommandInvocationId commandInvocationId)
-
-
Method Details
-
getCommandId
public byte getCommandId()Description copied from interface:ReplicableCommandUsed by marshallers to convert this command into an id for streaming.- Specified by:
getCommandIdin interfaceReplicableCommand- Overrides:
getCommandIdin classInvalidateCommand- Returns:
- the method id of this command. This is compatible with pre-2.2.0 MethodCall ids.
-
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.
-
writeTo
Description copied from interface:ReplicableCommandWrites this instance to theObjectOutput.- Specified by:
writeToin interfaceReplicableCommand- Overrides:
writeToin classInvalidateCommand- Parameters:
output- the stream.- Throws:
IOException- if an error occurred during the I/O.
-
readFrom
Description copied from interface:ReplicableCommandReads this instance from the stream written byReplicableCommand.writeTo(ObjectOutput).- Specified by:
readFromin interfaceReplicableCommand- Overrides:
readFromin classInvalidateCommand- Parameters:
input- the stream to read.- Throws:
IOException- if an error occurred during the I/O.ClassNotFoundException- if it tries to load an undefined class.
-
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
-
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.
-