Class RedisStreamCommands.MaxLenTrimStrategy

java.lang.Object
org.springframework.data.redis.connection.RedisStreamCommands.MaxLenTrimStrategy
All Implemented Interfaces:
RedisStreamCommands.TrimStrategy
Enclosing interface:
RedisStreamCommands

public static final class RedisStreamCommands.MaxLenTrimStrategy extends Object implements RedisStreamCommands.TrimStrategy
Trimming strategy that evicts entries as long as the stream's length exceeds the specified threshold.
Since:
4.1
Author:
Mark Paluch, Christoph Strobl, Tugdual Grall, Dengliming, Mark John Moreno, Jeonggyu Choi, Viktoriya Kutsarova
See Also:
  • Method Details

    • threshold

      public long threshold()
      The maximum number of entries allowed in the stream.
      Returns:
      non-negative number of entries allowed in the stream
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object