diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveGeoCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveGeoCommands.java index 62cebeed6..ce897c46b 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveGeoCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveGeoCommands.java @@ -876,8 +876,8 @@ public interface ReactiveGeoCommands { Assert.notNull(key, "Key must not be null!"); Assert.notNull(circle, "Circle must not be null!"); - return geoRadius(Mono.just(GeoRadiusCommand.within(circle).withArgs(geoRadiusArgs).forKey(key))).next() - .flatMapMany(CommandResponse::getOutput); + return geoRadius(Mono.just(GeoRadiusCommand.within(circle).withArgs(geoRadiusArgs).forKey(key))) + .flatMap(CommandResponse::getOutput); } /** @@ -1203,8 +1203,8 @@ public interface ReactiveGeoCommands { Assert.notNull(distance, "Distance must not be null!"); return geoRadiusByMember( - Mono.just(GeoRadiusByMemberCommand.within(distance).from(member).forKey(key).withArgs(geoRadiusArgs))).next() - .flatMapMany(CommandResponse::getOutput); + Mono.just(GeoRadiusByMemberCommand.within(distance).from(member).forKey(key).withArgs(geoRadiusArgs))) + .flatMap(CommandResponse::getOutput); } /** diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java index a0d3ee094..bac54a669 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java @@ -520,7 +520,7 @@ public interface ReactiveHashCommands { Assert.notNull(key, "Key must not be null!"); - return hKeys(Mono.just(new KeyCommand(key))).next().flatMapMany(CommandResponse::getOutput); + return hKeys(Mono.just(new KeyCommand(key))).flatMap(CommandResponse::getOutput); } /** @@ -543,7 +543,7 @@ public interface ReactiveHashCommands { Assert.notNull(key, "Key must not be null!"); - return hVals(Mono.just(new KeyCommand(key))).next().flatMapMany(CommandResponse::getOutput); + return hVals(Mono.just(new KeyCommand(key))).flatMap(CommandResponse::getOutput); } /** @@ -566,7 +566,7 @@ public interface ReactiveHashCommands { Assert.notNull(key, "Key must not be null!"); - return hGetAll(Mono.just(new KeyCommand(key))).next().flatMapMany(CommandResponse::getOutput); + return hGetAll(Mono.just(new KeyCommand(key))).flatMap(CommandResponse::getOutput); } /** diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveListCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveListCommands.java index fa283c830..5341969ae 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveListCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveListCommands.java @@ -272,8 +272,7 @@ public interface ReactiveListCommands { Assert.notNull(key, "Key must not be null!"); - return lRange(Mono.just(RangeCommand.key(key).fromIndex(start).toIndex(end))).next() - .flatMapMany(CommandResponse::getOutput); + return lRange(Mono.just(RangeCommand.key(key).fromIndex(start).toIndex(end))).flatMap(CommandResponse::getOutput); } /** diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveSetCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveSetCommands.java index 117cb6548..bbface735 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveSetCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveSetCommands.java @@ -528,7 +528,7 @@ public interface ReactiveSetCommands { Assert.notNull(keys, "Keys must not be null!"); - return sInter(Mono.just(SInterCommand.keys(keys))).next().flatMapMany(CommandResponse::getOutput); + return sInter(Mono.just(SInterCommand.keys(keys))).flatMap(CommandResponse::getOutput); } /** @@ -672,7 +672,7 @@ public interface ReactiveSetCommands { Assert.notNull(keys, "Keys must not be null!"); - return sUnion(Mono.just(SUnionCommand.keys(keys))).next().flatMapMany(CommandResponse::getOutput); + return sUnion(Mono.just(SUnionCommand.keys(keys))).flatMap(CommandResponse::getOutput); } /** @@ -816,7 +816,7 @@ public interface ReactiveSetCommands { Assert.notNull(keys, "Keys must not be null!"); - return sDiff(Mono.just(SDiffCommand.keys(keys))).next().flatMapMany(CommandResponse::getOutput); + return sDiff(Mono.just(SDiffCommand.keys(keys))).flatMap(CommandResponse::getOutput); } /** @@ -917,7 +917,7 @@ public interface ReactiveSetCommands { Assert.notNull(key, "Key must not be null!"); - return sMembers(Mono.just(new KeyCommand(key))).next().flatMapMany(CommandResponse::getOutput); + return sMembers(Mono.just(new KeyCommand(key))).flatMap(CommandResponse::getOutput); } /** @@ -1009,8 +1009,7 @@ public interface ReactiveSetCommands { Assert.notNull(key, "Key must not be null!"); Assert.notNull(count, "Count must not be null!"); - return sRandMember(Mono.just(SRandMembersCommand.valueCount(count).from(key))).next() - .flatMapMany(CommandResponse::getOutput); + return sRandMember(Mono.just(SRandMembersCommand.valueCount(count).from(key))).flatMap(CommandResponse::getOutput); } /** diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveZSetCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveZSetCommands.java index 7254d3168..ce2d7e5eb 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveZSetCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveZSetCommands.java @@ -657,8 +657,7 @@ public interface ReactiveZSetCommands { Assert.notNull(range, "Range must not be null!"); return zRange(Mono.just(ZRangeCommand.valuesWithin(range).from(key))) // - .next() // - .flatMapMany(CommandResponse::getOutput).map(tuple -> ByteBuffer.wrap(tuple.getValue())); + .flatMap(CommandResponse::getOutput).map(tuple -> ByteBuffer.wrap(tuple.getValue())); } /** @@ -673,8 +672,8 @@ public interface ReactiveZSetCommands { Assert.notNull(key, "Key must not be null!"); - return zRange(Mono.just(ZRangeCommand.valuesWithin(range).withScores().from(key))).next() - .flatMapMany(CommandResponse::getOutput); + return zRange(Mono.just(ZRangeCommand.valuesWithin(range).withScores().from(key))) + .flatMap(CommandResponse::getOutput); } /** @@ -689,8 +688,8 @@ public interface ReactiveZSetCommands { Assert.notNull(key, "Key must not be null!"); - return zRange(Mono.just(ZRangeCommand.reverseValuesWithin(range).from(key))).next() - .flatMapMany(CommandResponse::getOutput).map(tuple -> ByteBuffer.wrap(tuple.getValue())); + return zRange(Mono.just(ZRangeCommand.reverseValuesWithin(range).from(key))).flatMap(CommandResponse::getOutput) + .map(tuple -> ByteBuffer.wrap(tuple.getValue())); } /** @@ -705,8 +704,8 @@ public interface ReactiveZSetCommands { Assert.notNull(key, "Key must not be null!"); - return zRange(Mono.just(ZRangeCommand.reverseValuesWithin(range).withScores().from(key))).next() - .flatMapMany(CommandResponse::getOutput); + return zRange(Mono.just(ZRangeCommand.reverseValuesWithin(range).withScores().from(key))) + .flatMap(CommandResponse::getOutput); } /** @@ -848,8 +847,7 @@ public interface ReactiveZSetCommands { Assert.notNull(range, "Range must not be null!"); return zRangeByScore(Mono.just(ZRangeByScoreCommand.scoresWithin(range).from(key))) // - .next() // - .flatMapMany(CommandResponse::getOutput) // + .flatMap(CommandResponse::getOutput) // .map(tuple -> ByteBuffer.wrap(tuple.getValue())); } @@ -868,8 +866,7 @@ public interface ReactiveZSetCommands { Assert.notNull(range, "Range must not be null!"); return zRangeByScore(Mono.just(ZRangeByScoreCommand.scoresWithin(range).from(key).limitTo(limit))) // - .next() // - .flatMapMany(CommandResponse::getOutput) // + .flatMap(CommandResponse::getOutput) // .map(tuple -> ByteBuffer.wrap(tuple.getValue())); } @@ -886,8 +883,8 @@ public interface ReactiveZSetCommands { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range must not be null!"); - return zRangeByScore(Mono.just(ZRangeByScoreCommand.scoresWithin(range).withScores().from(key))).next() - .flatMapMany(CommandResponse::getOutput); + return zRangeByScore(Mono.just(ZRangeByScoreCommand.scoresWithin(range).withScores().from(key))) + .flatMap(CommandResponse::getOutput); } /** @@ -905,7 +902,7 @@ public interface ReactiveZSetCommands { Assert.notNull(range, "Range must not be null!"); return zRangeByScore(Mono.just(ZRangeByScoreCommand.scoresWithin(range).withScores().from(key).limitTo(limit))) - .next().flatMapMany(CommandResponse::getOutput); + .flatMap(CommandResponse::getOutput); } /** @@ -921,8 +918,7 @@ public interface ReactiveZSetCommands { Assert.notNull(key, "Key must not be null!"); return zRangeByScore(Mono.just(ZRangeByScoreCommand.reverseScoresWithin(range).from(key))) // - .next() // - .flatMapMany(CommandResponse::getOutput) // + .flatMap(CommandResponse::getOutput) // .map(tuple -> ByteBuffer.wrap(tuple.getValue())); } @@ -941,8 +937,7 @@ public interface ReactiveZSetCommands { Assert.notNull(range, "Range must not be null!"); return zRangeByScore(Mono.just(ZRangeByScoreCommand.reverseScoresWithin(range).from(key).limitTo(limit))) // - .next() // - .flatMapMany(CommandResponse::getOutput) // + .flatMap(CommandResponse::getOutput) // .map(tuple -> ByteBuffer.wrap(tuple.getValue())); } @@ -959,8 +954,8 @@ public interface ReactiveZSetCommands { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range must not be null!"); - return zRangeByScore(Mono.just(ZRangeByScoreCommand.reverseScoresWithin(range).withScores().from(key))).next() - .flatMapMany(CommandResponse::getOutput); + return zRangeByScore(Mono.just(ZRangeByScoreCommand.reverseScoresWithin(range).withScores().from(key))) + .flatMap(CommandResponse::getOutput); } /** @@ -978,8 +973,8 @@ public interface ReactiveZSetCommands { Assert.notNull(range, "Range must not be null!"); return zRangeByScore( - Mono.just(ZRangeByScoreCommand.reverseScoresWithin(range).withScores().from(key).limitTo(limit))).next() - .flatMapMany(CommandResponse::getOutput); + Mono.just(ZRangeByScoreCommand.reverseScoresWithin(range).withScores().from(key).limitTo(limit))) + .flatMap(CommandResponse::getOutput); } /** @@ -1736,8 +1731,8 @@ public interface ReactiveZSetCommands { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range must not be null!"); - return zRangeByLex(Mono.just(ZRangeByLexCommand.stringsWithin(range).from(key).limitTo(limit))).next() - .flatMapMany(CommandResponse::getOutput); + return zRangeByLex(Mono.just(ZRangeByLexCommand.stringsWithin(range).from(key).limitTo(limit))) + .flatMap(CommandResponse::getOutput); } /** @@ -1767,8 +1762,8 @@ public interface ReactiveZSetCommands { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range must not be null!"); - return zRangeByLex(Mono.just(ZRangeByLexCommand.reverseStringsWithin(range).from(key).limitTo(limit))).next() - .flatMapMany(CommandResponse::getOutput); + return zRangeByLex(Mono.just(ZRangeByLexCommand.reverseStringsWithin(range).from(key).limitTo(limit))) + .flatMap(CommandResponse::getOutput); } /**