@Override public Flux<V> range(K key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range must not be null!"); return createFlux(connection -> connection.zRange(rawKey(key), range).map(this::readValue)); }
/** * Get elements in {@literal range} from sorted set. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrange">Redis Documentation: ZRANGE</a> */ default Flux<ByteBuffer> zRange(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range must not be null!"); return zRange(Mono.just(ZRangeCommand.valuesWithin(range).from(key))) // .flatMap(CommandResponse::getOutput).map(tuple -> ByteBuffer.wrap(tuple.getValue())); }
/** * Get elements in {@literal range} from sorted set in reverse {@literal score} ordering. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrevrange">Redis Documentation: ZREVRANGE</a> */ default Flux<ByteBuffer> zRevRange(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); return zRange(Mono.just(ZRangeCommand.reverseValuesWithin(range).from(key))).flatMap(CommandResponse::getOutput) .map(tuple -> ByteBuffer.wrap(tuple.getValue())); }
/** * Get set of {@link Tuple}s in {@literal range} from sorted set. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrange">Redis Documentation: ZRANGE</a> */ default Flux<Tuple> zRangeWithScores(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); return zRange(Mono.just(ZRangeCommand.valuesWithin(range).withScores().from(key))) .flatMap(CommandResponse::getOutput); }
/** * Get set of {@link Tuple}s in {@literal range} from sorted set in reverse {@literal score} ordering. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrevrange">Redis Documentation: ZREVRANGE</a> */ default Flux<Tuple> zRevRangeWithScores(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); return zRange(Mono.just(ZRangeCommand.reverseValuesWithin(range).withScores().from(key))) .flatMap(CommandResponse::getOutput); }
@Override public Flux<V> range(K key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range must not be null!"); return createFlux(connection -> connection.zRange(rawKey(key), range).map(this::readValue)); }
@Override public Flux<V> range(K key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range must not be null!"); return createFlux(connection -> connection.zRange(rawKey(key), range).map(this::readValue)); }
/** * Get elements in {@literal range} from sorted set. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrange">Redis Documentation: ZRANGE</a> */ default Flux<ByteBuffer> zRange(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range must not be null!"); return zRange(Mono.just(ZRangeCommand.valuesWithin(range).from(key))) // .flatMap(CommandResponse::getOutput).map(tuple -> ByteBuffer.wrap(tuple.getValue())); }
/** * Get elements in {@literal range} from sorted set in reverse {@literal score} ordering. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrevrange">Redis Documentation: ZREVRANGE</a> */ default Flux<ByteBuffer> zRevRange(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); return zRange(Mono.just(ZRangeCommand.reverseValuesWithin(range).from(key))).flatMap(CommandResponse::getOutput) .map(tuple -> ByteBuffer.wrap(tuple.getValue())); }
/** * Get elements in {@literal range} from sorted set. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrange">Redis Documentation: ZRANGE</a> */ default Flux<ByteBuffer> zRange(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range must not be null!"); return zRange(Mono.just(ZRangeCommand.valuesWithin(range).from(key))) // .flatMap(CommandResponse::getOutput).map(tuple -> ByteBuffer.wrap(tuple.getValue())); }
/** * Get elements in {@literal range} from sorted set in reverse {@literal score} ordering. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrevrange">Redis Documentation: ZREVRANGE</a> */ default Flux<ByteBuffer> zRevRange(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); return zRange(Mono.just(ZRangeCommand.reverseValuesWithin(range).from(key))).flatMap(CommandResponse::getOutput) .map(tuple -> ByteBuffer.wrap(tuple.getValue())); }
/** * Get set of {@link Tuple}s in {@literal range} from sorted set. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrange">Redis Documentation: ZRANGE</a> */ default Flux<Tuple> zRangeWithScores(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); return zRange(Mono.just(ZRangeCommand.valuesWithin(range).withScores().from(key))) .flatMap(CommandResponse::getOutput); }
/** * Get set of {@link Tuple}s in {@literal range} from sorted set in reverse {@literal score} ordering. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrevrange">Redis Documentation: ZREVRANGE</a> */ default Flux<Tuple> zRevRangeWithScores(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); return zRange(Mono.just(ZRangeCommand.reverseValuesWithin(range).withScores().from(key))) .flatMap(CommandResponse::getOutput); }
/** * Get set of {@link Tuple}s in {@literal range} from sorted set. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrange">Redis Documentation: ZRANGE</a> */ default Flux<Tuple> zRangeWithScores(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); return zRange(Mono.just(ZRangeCommand.valuesWithin(range).withScores().from(key))) .flatMap(CommandResponse::getOutput); }
/** * Get set of {@link Tuple}s in {@literal range} from sorted set in reverse {@literal score} ordering. * * @param key must not be {@literal null}. * @param range must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/zrevrange">Redis Documentation: ZREVRANGE</a> */ default Flux<Tuple> zRevRangeWithScores(ByteBuffer key, Range<Long> range) { Assert.notNull(key, "Key must not be null!"); return zRange(Mono.just(ZRangeCommand.reverseValuesWithin(range).withScores().from(key))) .flatMap(CommandResponse::getOutput); }