@Override public Flux<NumericResponse<BitCountCommand, Long>> bitCount(Publisher<BitCountCommand> commands) { return connection.execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null!"); Range<Long> range = command.getRange(); return (!Range.unbounded().equals(range) ? cmd.bitcount(command.getKey(), LettuceConverters.getLowerBoundIndex(range), // LettuceConverters.getUpperBoundIndex(range)) // : cmd.bitcount(command.getKey())).map(responseValue -> new NumericResponse<>(command, responseValue)); })); }
@Override public Flux<NumericResponse<BitCountCommand, Long>> bitCount(Publisher<BitCountCommand> commands) { return connection.execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null!"); Range<Long> range = command.getRange(); return (!Range.unbounded().equals(range) ? cmd.bitcount(command.getKey(), LettuceConverters.getLowerBoundIndex(range), // LettuceConverters.getUpperBoundIndex(range)) // : cmd.bitcount(command.getKey())).map(responseValue -> new NumericResponse<>(command, responseValue)); })); }
@Override public Flux<NumericResponse<BitCountCommand, Long>> bitCount(Publisher<BitCountCommand> commands) { return connection.execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null!"); Range<Long> range = command.getRange(); return (!Range.unbounded().equals(range) ? cmd.bitcount(command.getKey(), LettuceConverters.getLowerBoundIndex(range), // LettuceConverters.getUpperBoundIndex(range)) // : cmd.bitcount(command.getKey())).map(responseValue -> new NumericResponse<>(command, responseValue)); })); }