@@ -59,7 +59,8 @@ public Boolean zAdd(byte[] key, double score, byte[] value, ZAddArgs args) {
59
59
Assert .notNull (key , "Key must not be null!" );
60
60
Assert .notNull (value , "Value must not be null!" );
61
61
62
- return connection .invoke ().from (RedisSortedSetAsyncCommands ::zadd , key , LettuceZSetCommands .toZAddArgs (args ), score , value )
62
+ return connection .invoke ()
63
+ .from (RedisSortedSetAsyncCommands ::zadd , key , LettuceZSetCommands .toZAddArgs (args ), score , value )
63
64
.get (LettuceConverters .longToBoolean ());
64
65
}
65
66
@@ -165,15 +166,15 @@ public Set<Tuple> zRangeByScoreWithScores(byte[] key, Range range, Limit limit)
165
166
Assert .notNull (range , "Range for ZRANGEBYSCOREWITHSCORES must not be null!" );
166
167
Assert .notNull (limit , "Limit must not be null!" );
167
168
168
- if (limit .isUnlimited ()) {
169
- return connection .invoke ().fromMany (RedisSortedSetAsyncCommands ::zrangebyscoreWithScores , key ,
170
- LettuceConverters .<Number > toRange (range )).toSet (LettuceConverters ::toTuple );
171
- }
169
+ if (limit .isUnlimited ()) {
170
+ return connection .invoke ().fromMany (RedisSortedSetAsyncCommands ::zrangebyscoreWithScores , key ,
171
+ LettuceConverters .<Number > toRange (range )).toSet (LettuceConverters ::toTuple );
172
+ }
172
173
173
- return connection . invoke ()
174
- .fromMany (RedisSortedSetAsyncCommands ::zrangebyscoreWithScores , key ,
175
- LettuceConverters .<Number > toRange (range ), LettuceConverters .toLimit (limit ))
176
- .toSet (LettuceConverters ::toTuple );
174
+ return connection
175
+ . invoke () .fromMany (RedisSortedSetAsyncCommands ::zrangebyscoreWithScores , key ,
176
+ LettuceConverters .<Number > toRange (range ), LettuceConverters .toLimit (limit ))
177
+ .toSet (LettuceConverters ::toTuple );
177
178
178
179
}
179
180
@@ -214,15 +215,15 @@ public Set<byte[]> zRevRangeByScore(byte[] key, Range range, Limit limit) {
214
215
Assert .notNull (range , "Range for ZREVRANGEBYSCORE must not be null!" );
215
216
Assert .notNull (limit , "Limit must not be null!" );
216
217
217
- if (limit .isUnlimited ()) {
218
+ if (limit .isUnlimited ()) {
218
219
219
- return connection .invoke ()
220
- .fromMany (RedisSortedSetAsyncCommands ::zrevrangebyscore , key , LettuceConverters .<Number > toRange (range ))
221
- .toSet ();
222
- }
220
+ return connection .invoke ()
221
+ .fromMany (RedisSortedSetAsyncCommands ::zrevrangebyscore , key , LettuceConverters .<Number > toRange (range ))
222
+ .toSet ();
223
+ }
223
224
224
- return connection .invoke ().fromMany (RedisSortedSetAsyncCommands ::zrevrangebyscore , key ,
225
- LettuceConverters .<Number > toRange (range ), LettuceConverters .toLimit (limit )).toSet ();
225
+ return connection .invoke ().fromMany (RedisSortedSetAsyncCommands ::zrevrangebyscore , key ,
226
+ LettuceConverters .<Number > toRange (range ), LettuceConverters .toLimit (limit )).toSet ();
226
227
227
228
}
228
229
@@ -237,15 +238,15 @@ public Set<Tuple> zRevRangeByScoreWithScores(byte[] key, Range range, Limit limi
237
238
Assert .notNull (range , "Range for ZREVRANGEBYSCOREWITHSCORES must not be null!" );
238
239
Assert .notNull (limit , "Limit must not be null!" );
239
240
240
- if (limit .isUnlimited ()) {
241
- return connection .invoke ().fromMany (RedisSortedSetAsyncCommands ::zrevrangebyscoreWithScores , key ,
242
- LettuceConverters .<Number > toRange (range )).toSet (LettuceConverters ::toTuple );
243
- }
241
+ if (limit .isUnlimited ()) {
242
+ return connection .invoke ().fromMany (RedisSortedSetAsyncCommands ::zrevrangebyscoreWithScores , key ,
243
+ LettuceConverters .<Number > toRange (range )).toSet (LettuceConverters ::toTuple );
244
+ }
244
245
245
- return connection .invoke ()
246
- .fromMany (RedisSortedSetAsyncCommands ::zrevrangebyscoreWithScores , key ,
247
- LettuceConverters .<Number > toRange (range ), LettuceConverters .toLimit (limit ))
248
- .toSet (LettuceConverters ::toTuple );
246
+ return connection .invoke ()
247
+ .fromMany (RedisSortedSetAsyncCommands ::zrevrangebyscoreWithScores , key ,
248
+ LettuceConverters .<Number > toRange (range ), LettuceConverters .toLimit (limit ))
249
+ .toSet (LettuceConverters ::toTuple );
249
250
250
251
}
251
252
@@ -580,23 +581,23 @@ private static io.lettuce.core.ZAddArgs toZAddArgs(ZAddArgs source) {
580
581
581
582
io .lettuce .core .ZAddArgs target = new io .lettuce .core .ZAddArgs ();
582
583
583
- if (!source .isEmpty ()) {
584
+ if (!source .isEmpty ()) {
584
585
return target ;
585
586
}
586
587
587
- if (source .contains (Flag .XX )) {
588
+ if (source .contains (Flag .XX )) {
588
589
target .xx ();
589
590
}
590
- if (source .contains (Flag .NX )) {
591
+ if (source .contains (Flag .NX )) {
591
592
target .nx ();
592
593
}
593
- if (source .contains (Flag .GT )) {
594
+ if (source .contains (Flag .GT )) {
594
595
target .gt ();
595
596
}
596
- if (source .contains (Flag .LT )) {
597
+ if (source .contains (Flag .LT )) {
597
598
target .lt ();
598
599
}
599
- if (source .contains (Flag .CH )) {
600
+ if (source .contains (Flag .CH )) {
600
601
target .ch ();
601
602
}
602
603
return target ;
0 commit comments