@Override public LettuceReactiveClusterHyperLogLogCommands hyperLogLogCommands() { return new LettuceReactiveClusterHyperLogLogCommands(this); }
@Override public Flux<BooleanResponse<PfMergeCommand>> pfMerge(Publisher<PfMergeCommand> commands) { return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null for PFMERGE"); Assert.notEmpty(command.getSourceKeys(), "Source keys must not be null or empty for PFMERGE!"); List<ByteBuffer> keys = new ArrayList<>(command.getSourceKeys()); keys.add(command.getKey()); if (ClusterSlotHashUtil.isSameSlotForAllKeys(keys.toArray(new ByteBuffer[keys.size()]))) { return super.pfMerge(Mono.just(command)); } return Mono .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFMERGE in cluster mode.")); })); }
@Override public Flux<NumericResponse<PfCountCommand, Long>> pfCount(Publisher<PfCountCommand> commands) { return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notEmpty(command.getKeys(), "Keys must be null or empty for PFCOUNT!"); if (ClusterSlotHashUtil .isSameSlotForAllKeys(command.getKeys().toArray(new ByteBuffer[command.getKeys().size()]))) { return super.pfCount(Mono.just(command)); } return Mono .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFCOUNT in cluster mode.")); })); } }
@Override public LettuceReactiveClusterHyperLogLogCommands hyperLogLogCommands() { return new LettuceReactiveClusterHyperLogLogCommands(this); }
@Override public Flux<BooleanResponse<PfMergeCommand>> pfMerge(Publisher<PfMergeCommand> commands) { return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null for PFMERGE"); Assert.notEmpty(command.getSourceKeys(), "Source keys must not be null or empty for PFMERGE!"); List<ByteBuffer> keys = new ArrayList<>(command.getSourceKeys()); keys.add(command.getKey()); if (ClusterSlotHashUtil.isSameSlotForAllKeys(keys.toArray(new ByteBuffer[keys.size()]))) { return super.pfMerge(Mono.just(command)); } return Mono .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFMERGE in cluster mode.")); })); }
@Override public LettuceReactiveClusterHyperLogLogCommands hyperLogLogCommands() { return new LettuceReactiveClusterHyperLogLogCommands(this); }
@Override public Flux<BooleanResponse<PfMergeCommand>> pfMerge(Publisher<PfMergeCommand> commands) { return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null for PFMERGE"); Assert.notEmpty(command.getSourceKeys(), "Source keys must not be null or empty for PFMERGE!"); List<ByteBuffer> keys = new ArrayList<>(command.getSourceKeys()); keys.add(command.getKey()); if (ClusterSlotHashUtil.isSameSlotForAllKeys(keys.toArray(new ByteBuffer[keys.size()]))) { return super.pfMerge(Mono.just(command)); } return Mono .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFMERGE in cluster mode.")); })); }
@Override public Flux<NumericResponse<PfCountCommand, Long>> pfCount(Publisher<PfCountCommand> commands) { return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notEmpty(command.getKeys(), "Keys must be null or empty for PFCOUNT!"); if (ClusterSlotHashUtil .isSameSlotForAllKeys(command.getKeys().toArray(new ByteBuffer[command.getKeys().size()]))) { return super.pfCount(Mono.just(command)); } return Mono .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFCOUNT in cluster mode.")); })); } }
@Override public Flux<NumericResponse<PfCountCommand, Long>> pfCount(Publisher<PfCountCommand> commands) { return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notEmpty(command.getKeys(), "Keys must be null or empty for PFCOUNT!"); if (ClusterSlotHashUtil .isSameSlotForAllKeys(command.getKeys().toArray(new ByteBuffer[command.getKeys().size()]))) { return super.pfCount(Mono.just(command)); } return Mono .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFCOUNT in cluster mode.")); })); } }