diff --git a/src/main/java/org/springframework/data/redis/connection/RedisStreamCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisStreamCommands.java index e03ce7af8..97eccc122 100644 --- a/src/main/java/org/springframework/data/redis/connection/RedisStreamCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/RedisStreamCommands.java @@ -91,6 +91,7 @@ public interface RedisStreamCommands { * @param record the {@link MapRecord record} to append. * @return the {@link RecordId id} after save. {@literal null} when used in pipeline / transaction. */ + @Nullable default RecordId xAdd(MapRecord record) { return xAdd(record, XAddOptions.none()); } @@ -106,6 +107,7 @@ public interface RedisStreamCommands { * @return the {@link RecordId id} after save. {@literal null} when used in pipeline / transaction. * @since 2.3 */ + @Nullable RecordId xAdd(MapRecord record, XAddOptions options); /** @@ -188,6 +190,7 @@ public interface RedisStreamCommands { * @see Redis Documentation: XCLAIM * @since 2.3 */ + @Nullable List xClaimJustId(byte[] key, String group, String newOwner, XClaimOptions options); /** @@ -202,6 +205,7 @@ public interface RedisStreamCommands { * @see Redis Documentation: XCLAIM * @since 2.3 */ + @Nullable default List xClaim(byte[] key, String group, String newOwner, Duration minIdleTime, RecordId... recordIds) { return xClaim(key, group, newOwner, XClaimOptions.minIdle(minIdleTime).ids(recordIds)); @@ -218,6 +222,7 @@ public interface RedisStreamCommands { * @see Redis Documentation: XCLAIM * @since 2.3 */ + @Nullable List xClaim(byte[] key, String group, String newOwner, XClaimOptions options); /** @@ -445,6 +450,7 @@ public interface RedisStreamCommands { * @return number of removed entries. {@literal null} when used in pipeline / transaction. * @see Redis Documentation: XDEL */ + @Nullable Long xDel(byte[] key, RecordId... recordIds); /**