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
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
FieldsFields inherited from class org.infinispan.commands.write.RemoveCommand
metadata, successful, value, valueMatcherFields inherited from class org.infinispan.commands.write.AbstractDataWriteCommand
commandInvocationIdFields inherited from class org.infinispan.commands.read.AbstractDataCommand
key, segment -
Constructor Summary
ConstructorsConstructorDescriptionRemoveExpiredCommand(Object key, Object value, Long lifespan, boolean maxIdle, int segment, long flagBitSet, CommandInvocationId commandInvocationId) -
Method Summary
Modifier and TypeMethodDescriptionacceptVisitor(InvocationContext ctx, Visitor visitor) Accept a visitor, and return the result of accepting this visitor.booleanbyteUsed by marshallers to convert this command into an id for streaming.inthashCode()booleanCertain commands only work based on a certain condition or state of the cache.booleanWhether this remove expired was fired because of max idlebooleanvoidreadFrom(ObjectInput input) Reads this instance from the stream written byReplicableCommand.writeTo(ObjectOutput).toString()voidwriteTo(ObjectOutput output) Writes this instance to theObjectOutput.Methods inherited from class org.infinispan.commands.write.RemoveCommand
fail, getInternalMetadata, getMetadata, getValue, getValueMatcher, isNonExistent, isReturnEntryNecessary, isReturnValueExpected, isSuccessful, loadType, nonExistant, setInternalMetadata, setMetadata, setValue, setValueMatcherMethods inherited from class org.infinispan.commands.write.AbstractDataWriteCommand
getAffectedKeys, getCommandInvocationId, getKeyLockOwner, getKeysToLock, hasSkipLocking, hasZeroLockAcquisitionMethods inherited from class org.infinispan.commands.read.AbstractDataCommand
getFlagsBitSet, getKey, getSegment, getTopologyId, printFlags, setFlagsBitSet, setKey, setTopologyIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.commands.DataCommand
getKeyMethods inherited from interface org.infinispan.commands.write.DataWriteCommand
getInternalMetadata, setInternalMetadataMethods inherited from interface org.infinispan.commands.FlagAffectedCommand
addFlag, addFlags, addFlags, getFlags, getFlagsBitSet, hasAllFlags, hasAnyFlag, hasFlag, setFlags, setFlagsBitSetMethods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, invoke, invokeAsync, setOriginMethods inherited from interface org.infinispan.commands.SegmentSpecificCommand
getSegmentMethods inherited from interface org.infinispan.commands.TopologyAffectedCommand
getTopologyId, setTopologyIdMethods inherited from interface org.infinispan.commands.VisitableCommand
initMethods inherited from interface org.infinispan.commands.write.WriteCommand
isWriteOnly, updateStatusFromRemoteResponse
-
Field Details
-
COMMAND_ID
public static final int COMMAND_ID- See Also:
-
-
Constructor Details
-
RemoveExpiredCommand
public RemoveExpiredCommand() -
RemoveExpiredCommand
public RemoveExpiredCommand(Object key, Object value, Long lifespan, boolean maxIdle, int segment, long flagBitSet, CommandInvocationId commandInvocationId)
-
-
Method Details
-
acceptVisitor
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
- Overrides:
toStringin classRemoveCommand
-
writeTo
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
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
- 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
-
logThrowable
-