Package org.infinispan.commands.write
Class EvictCommand
- java.lang.Object
-
- org.infinispan.commands.read.AbstractDataCommand
-
- org.infinispan.commands.write.AbstractDataWriteCommand
-
- org.infinispan.commands.write.RemoveCommand
-
- org.infinispan.commands.write.EvictCommand
-
- All Implemented Interfaces:
DataCommand
,FlagAffectedCommand
,LocalCommand
,MetadataAwareCommand
,ReplicableCommand
,SegmentSpecificCommand
,TopologyAffectedCommand
,VisitableCommand
,DataWriteCommand
,WriteCommand
,RemoteLockCommand
public class EvictCommand extends RemoveCommand implements LocalCommand
- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.commands.VisitableCommand
VisitableCommand.LoadType
-
-
Field Summary
-
Fields inherited from class org.infinispan.commands.write.RemoveCommand
COMMAND_ID, metadata, notifier, successful, value, valueMatcher
-
Fields inherited from class org.infinispan.commands.write.AbstractDataWriteCommand
commandInvocationId
-
Fields inherited from class org.infinispan.commands.read.AbstractDataCommand
key, segment
-
-
Constructor Summary
Constructors Constructor Description EvictCommand(Object key, CacheNotifier notifier, int segment, long flagsBitSet, CommandInvocationId commandInvocationId, org.infinispan.container.impl.InternalEntryFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
acceptVisitor(InvocationContext ctx, Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.byte
getCommandId()
Used by marshallers to convert this command into an id for streaming.VisitableCommand.LoadType
loadType()
void
notify(InvocationContext ctx, Object value, Metadata previousMetadata, boolean isPre)
Object
perform(InvocationContext ctx)
Performs the primary function of the command.String
toString()
-
Methods inherited from class org.infinispan.commands.write.RemoveCommand
equals, fail, getMetadata, getValue, getValueMatcher, hashCode, init, isConditional, isNonExistent, isReturnValueExpected, isSuccessful, performRemove, readFrom, setMetadata, setValue, setValueMatcher, writeTo
-
Methods inherited from class org.infinispan.commands.write.AbstractDataWriteCommand
canBlock, getAffectedKeys, getCommandInvocationId, getKeyLockOwner, getKeysToLock, hasSkipLocking, hasZeroLockAcquisition
-
Methods inherited from class org.infinispan.commands.read.AbstractDataCommand
getFlagsBitSet, getKey, getSegment, getTopologyId, printFlags, setFlagsBitSet, setKey, setTopologyId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.commands.DataCommand
getKey
-
Methods inherited from interface org.infinispan.commands.FlagAffectedCommand
addFlag, addFlags, addFlags, getFlags, getFlagsBitSet, hasAllFlags, hasAnyFlag, hasFlag, setFlags, setFlagsBitSet
-
Methods inherited from interface org.infinispan.commands.ReplicableCommand
invoke, invokeAsync, setOrigin
-
Methods inherited from interface org.infinispan.commands.SegmentSpecificCommand
getSegment
-
Methods inherited from interface org.infinispan.commands.TopologyAffectedCommand
getTopologyId, setTopologyId
-
Methods inherited from interface org.infinispan.commands.VisitableCommand
ignoreCommandOnStatus, shouldInvoke
-
Methods inherited from interface org.infinispan.commands.write.WriteCommand
isWriteOnly, updateStatusFromRemoteResponse
-
-
-
-
Constructor Detail
-
EvictCommand
public EvictCommand(Object key, CacheNotifier notifier, int segment, long flagsBitSet, CommandInvocationId commandInvocationId, org.infinispan.container.impl.InternalEntryFactory factory)
-
-
Method Detail
-
acceptVisitor
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
Description copied from interface:VisitableCommand
Accept a visitor, and return the result of accepting this visitor.- Specified by:
acceptVisitor
in interfaceVisitableCommand
- Overrides:
acceptVisitor
in classRemoveCommand
- Parameters:
ctx
- invocation contextvisitor
- visitor to accept- Returns:
- arbitrary return value
- Throws:
Throwable
- in the event of problems
-
perform
public Object perform(InvocationContext ctx) throws Throwable
Description copied from interface:VisitableCommand
Performs the primary function of the command. Please see specific implementation classes for details on what is performed as well as return types. Important: this method will be invoked at the end of interceptors chain. It should never be called directly from a custom interceptor.- Specified by:
perform
in interfaceReplicableCommand
- Specified by:
perform
in interfaceVisitableCommand
- Overrides:
perform
in classRemoveCommand
- Parameters:
ctx
- invocation context- Returns:
- arbitrary return value generated by performing this command
- Throws:
Throwable
- in the event of problems.
-
notify
public void notify(InvocationContext ctx, Object value, Metadata previousMetadata, boolean isPre)
- Overrides:
notify
in classRemoveCommand
-
getCommandId
public byte getCommandId()
Description copied from interface:ReplicableCommand
Used by marshallers to convert this command into an id for streaming.- Specified by:
getCommandId
in interfaceReplicableCommand
- Overrides:
getCommandId
in classRemoveCommand
- Returns:
- the method id of this command. This is compatible with pre-2.2.0 MethodCall ids.
-
toString
public String toString()
- Overrides:
toString
in classRemoveCommand
-
loadType
public VisitableCommand.LoadType loadType()
- Specified by:
loadType
in interfaceVisitableCommand
- Overrides:
loadType
in classRemoveCommand
- Returns:
- Nodes on which the command needs to read the previous values of the keys it acts on.
-
-