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
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionlongThe maximum number of entries allowed in the stream.
-
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
-