diff --git a/redisson/src/main/java/org/redisson/api/RTimeSeriesReactive.java b/redisson/src/main/java/org/redisson/api/RTimeSeriesReactive.java index 3d6ba501c..ab9bddf2d 100644 --- a/redisson/src/main/java/org/redisson/api/RTimeSeriesReactive.java +++ b/redisson/src/main/java/org/redisson/api/RTimeSeriesReactive.java @@ -325,6 +325,16 @@ public interface RTimeSeriesReactive extends RExpirableReactive { */ Mono> range(long startTimestamp, long endTimestamp); + /** + * Returns ordered elements of this time-series collection within timestamp range. Including boundary values. + * + * @param startTimestamp start timestamp + * @param endTimestamp end timestamp + * @param limit result size limit + * @return elements collection + */ + Mono> range(long startTimestamp, long endTimestamp, int limit); + /** * Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values. * @@ -334,6 +344,16 @@ public interface RTimeSeriesReactive extends RExpirableReactive { */ Mono> rangeReversed(long startTimestamp, long endTimestamp); + /** + * Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values. + * + * @param startTimestamp start timestamp + * @param endTimestamp end timestamp + * @param limit result size limit + * @return elements collection + */ + Mono> rangeReversed(long startTimestamp, long endTimestamp, int limit); + /** * Returns ordered entries of this time-series collection within timestamp range. Including boundary values. * @@ -343,6 +363,16 @@ public interface RTimeSeriesReactive extends RExpirableReactive { */ Mono>> entryRange(long startTimestamp, long endTimestamp); + /** + * Returns ordered entries of this time-series collection within timestamp range. Including boundary values. + * + * @param startTimestamp start timestamp + * @param endTimestamp end timestamp + * @param limit result size limit + * @return elements collection + */ + Mono>> entryRange(long startTimestamp, long endTimestamp, int limit); + /** * Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values. * @@ -352,4 +382,14 @@ public interface RTimeSeriesReactive extends RExpirableReactive { */ Mono>> entryRangeReversed(long startTimestamp, long endTimestamp); + /** + * Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values. + * + * @param startTimestamp start timestamp + * @param endTimestamp end timestamp + * @param limit result size limit + * @return elements collection + */ + Mono>> entryRangeReversed(long startTimestamp, long endTimestamp, int limit); + } diff --git a/redisson/src/main/java/org/redisson/api/RTimeSeriesRx.java b/redisson/src/main/java/org/redisson/api/RTimeSeriesRx.java index 6992eab63..af204a84d 100644 --- a/redisson/src/main/java/org/redisson/api/RTimeSeriesRx.java +++ b/redisson/src/main/java/org/redisson/api/RTimeSeriesRx.java @@ -166,7 +166,7 @@ public interface RTimeSeriesRx extends RExpirableRx { * @param timestamp - object timestamp * @return entry or null if it doesn't exist */ - Maybe> getAndRemoveEntry(long timestamp); + Maybe> getAndRemoveEntry(long timestamp); /** * Removes and returns the head elements or {@code null} if this time-series collection is empty. @@ -323,6 +323,16 @@ public interface RTimeSeriesRx extends RExpirableRx { */ Single> range(long startTimestamp, long endTimestamp); + /** + * Returns ordered elements of this time-series collection within timestamp range. Including boundary values. + * + * @param startTimestamp start timestamp + * @param endTimestamp end timestamp + * @param limit result size limit + * @return elements collection + */ + Single> range(long startTimestamp, long endTimestamp, int limit); + /** * Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values. * @@ -332,6 +342,16 @@ public interface RTimeSeriesRx extends RExpirableRx { */ Single> rangeReversed(long startTimestamp, long endTimestamp); + /** + * Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values. + * + * @param startTimestamp start timestamp + * @param endTimestamp end timestamp + * @param limit result size limit + * @return elements collection + */ + Single> rangeReversed(long startTimestamp, long endTimestamp, int limit); + /** * Returns ordered entries of this time-series collection within timestamp range. Including boundary values. * @@ -341,6 +361,16 @@ public interface RTimeSeriesRx extends RExpirableRx { */ Single>> entryRange(long startTimestamp, long endTimestamp); + /** + * Returns ordered entries of this time-series collection within timestamp range. Including boundary values. + * + * @param startTimestamp start timestamp + * @param endTimestamp end timestamp + * @param limit result size limit + * @return elements collection + */ + Single>> entryRange(long startTimestamp, long endTimestamp, int limit); + /** * Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values. * @@ -350,4 +380,14 @@ public interface RTimeSeriesRx extends RExpirableRx { */ Single>> entryRangeReversed(long startTimestamp, long endTimestamp); + /** + * Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values. + * + * @param startTimestamp start timestamp + * @param endTimestamp end timestamp + * @param limit result size limit + * @return elements collection + */ + Single>> entryRangeReversed(long startTimestamp, long endTimestamp, int limit); + }