Class RemoveExpiredCommand

All Implemented Interfaces:
DataCommand, FlagAffectedCommand, MetadataAwareCommand, CacheRpcCommand, ReplicableCommand, SegmentSpecificCommand, TopologyAffectedCommand, TracedCommand, VisitableCommand, DataWriteCommand, WriteCommand, VersionAware, RemoteLockCommand

@ProtoTypeId(29) public class RemoveExpiredCommand extends RemoveCommand
Removes an entry that is expired from memory
Since:
8.0
Author:
William Burns
  • Constructor Details

  • Method Details

    • 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 interface VisitableCommand
      Overrides:
      acceptVisitor in class RemoveCommand
      Parameters:
      ctx - invocation context
      visitor - visitor to accept
      Returns:
      arbitrary return value
      Throws:
      Throwable - in the event of problems
    • isConditional

      public boolean isConditional()
      Description copied from interface: WriteCommand
      Certain 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:
      isConditional in interface WriteCommand
      Overrides:
      isConditional in class RemoveCommand
      Returns:
      true if the command is conditional, false otherwise
    • shouldReplicate

      public boolean shouldReplicate(InvocationContext ctx, boolean requireReplicateIfRemote)
      Description copied from interface: WriteCommand
      Some commands may be successful but not need to be replicated to other nodes, stores or listeners. For example a unconditional remove may be performed on a key that doesn't exist. In that case the command is still successful but does not need to replicate that information other places.
      Specified by:
      shouldReplicate in interface WriteCommand
      Overrides:
      shouldReplicate in class RemoveCommand
      Parameters:
      ctx - invocation context if present, may be null
      requireReplicateIfRemote - if the command can replicate even if not a locally invoked command
      Returns:
      whether the command should replicate default just invokes WriteCommand.isSuccessful()
    • supportedSince

      public NodeVersion supportedSince()
      Description copied from interface: ReplicableCommand
      Returns a NodeVersion representing 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 ReplicableCommand should always override this method.

      Specified by:
      supportedSince in interface ReplicableCommand
      Specified by:
      supportedSince in interface VersionAware
      Overrides:
      supportedSince in class RemoveCommand
      Returns:
      a NodeVersion corresponding to the Infinispan version this command was added.
    • toString

      public String toString()
      Overrides:
      toString in class RemoveCommand
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class RemoveCommand
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class RemoveCommand
    • 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()
    • logThrowable

      public boolean logThrowable(Throwable t)