Package org.infinispan.commands.write
Class RemoveExpiredCommand
- java.lang.Object
-
- org.infinispan.commands.read.AbstractDataCommand
-
- org.infinispan.commands.write.AbstractDataWriteCommand
-
- org.infinispan.commands.write.RemoveCommand
-
- org.infinispan.commands.write.RemoveExpiredCommand
-
- All Implemented Interfaces:
DataCommand,FlagAffectedCommand,MetadataAwareCommand,ReplicableCommand,SegmentSpecificCommand,TopologyAffectedCommand,VisitableCommand,DataWriteCommand,WriteCommand,RemoteLockCommand
public class RemoveExpiredCommand extends RemoveCommand
Removes an entry that is expired from memory- Since:
- 8.0
- Author:
- William Burns
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.commands.VisitableCommand
VisitableCommand.LoadType
-
-
Field Summary
Fields Modifier and Type Field Description static intCOMMAND_ID-
Fields inherited from class org.infinispan.commands.write.RemoveCommand
metadata, 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 RemoveExpiredCommand()RemoveExpiredCommand(Object key, Object value, Long lifespan, boolean maxIdle, int segment, long flagBitSet, CommandInvocationId commandInvocationId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectacceptVisitor(InvocationContext ctx, Visitor visitor)Accept a visitor, and return the result of accepting this visitor.booleanequals(Object o)bytegetCommandId()Used by marshallers to convert this command into an id for streaming.LonggetLifespan()inthashCode()booleanisConditional()Certain commands only work based on a certain condition or state of the cache.booleanisMaxIdle()Whether this remove expired was fired because of max idlevoidreadFrom(ObjectInput input)Reads this instance from the stream written byReplicableCommand.writeTo(ObjectOutput).StringtoString()voidwriteTo(ObjectOutput output)Writes this instance to theObjectOutput.-
Methods inherited from class org.infinispan.commands.write.RemoveCommand
fail, getInternalMetadata, getMetadata, getValue, getValueMatcher, isNonExistent, isReturnValueExpected, isSuccessful, loadType, nonExistant, setInternalMetadata, setMetadata, setValue, setValueMatcher
-
Methods inherited from class org.infinispan.commands.write.AbstractDataWriteCommand
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.write.DataWriteCommand
getInternalMetadata, setInternalMetadata
-
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
canBlock, 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
init
-
Methods inherited from interface org.infinispan.commands.write.WriteCommand
isWriteOnly, updateStatusFromRemoteResponse
-
-
-
-
Field Detail
-
COMMAND_ID
public static final int COMMAND_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RemoveExpiredCommand
public RemoveExpiredCommand()
-
RemoveExpiredCommand
public RemoveExpiredCommand(Object key, Object value, Long lifespan, boolean maxIdle, int segment, long flagBitSet, CommandInvocationId commandInvocationId)
-
-
Method Detail
-
acceptVisitor
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
Description copied from interface:VisitableCommandAccept a visitor, and return the result of accepting this visitor.- Specified by:
acceptVisitorin interfaceVisitableCommand- Overrides:
acceptVisitorin classRemoveCommand- Parameters:
ctx- invocation contextvisitor- visitor to accept- Returns:
- arbitrary return value
- Throws:
Throwable- in the event of problems
-
isConditional
public boolean isConditional()
Description copied from interface:WriteCommandCertain commands only work based on a certain condition or state of the cache. For example,ConcurrentMap.putIfAbsent(Object, Object)only does anything if a condition is met, i.e., the entry in question is not already present. This method tests whether the command in question is conditional or not.- Specified by:
isConditionalin interfaceWriteCommand- Overrides:
isConditionalin classRemoveCommand- Returns:
- true if the command is conditional, false otherwise
-
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 classRemoveCommand- Returns:
- the method id of this command. This is compatible with pre-2.2.0 MethodCall ids.
-
toString
public String toString()
- Overrides:
toStringin classRemoveCommand
-
writeTo
public void writeTo(ObjectOutput output) throws IOException
Description copied from interface:ReplicableCommandWrites this instance to theObjectOutput.- Specified by:
writeToin interfaceReplicableCommand- Overrides:
writeToin classRemoveCommand- Parameters:
output- the stream.- Throws:
IOException- if an error occurred during the I/O.
-
readFrom
public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException
Description copied from interface:ReplicableCommandReads this instance from the stream written byReplicableCommand.writeTo(ObjectOutput).- Specified by:
readFromin interfaceReplicableCommand- Overrides:
readFromin classRemoveCommand- 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.
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classRemoveCommand
-
hashCode
public int hashCode()
- Overrides:
hashCodein classRemoveCommand
-
isMaxIdle
public boolean isMaxIdle()
Whether this remove expired was fired because of max idle- Returns:
- if this command is max idle based expiration
-
getLifespan
public Long getLifespan()
-
-