/** * Removes all occurrences of {@literal value} from the list stored at {@literal key}. * * @param key must not be {@literal null}. * @param value must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/lrem">Redis Documentation: LREM</a> */ default Mono<Long> lRem(ByteBuffer key, ByteBuffer value) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(value, "Value must not be null!"); return lRem(Mono.just(LRemCommand.all().occurrencesOf(value).from(key))).next().map(NumericResponse::getOutput); }
/** * Removes the first {@literal count} occurrences of {@literal value} from the list stored at {@literal key}. * * @param key must not be {@literal null}. * @param count must not be {@literal null}. * @param value must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/lrem">Redis Documentation: LREM</a> */ default Mono<Long> lRem(ByteBuffer key, Long count, ByteBuffer value) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(count, "Count must not be null!"); Assert.notNull(value, "Value must not be null!"); return lRem(Mono.just(LRemCommand.first(count).occurrencesOf(value).from(key))).next() .map(NumericResponse::getOutput); }
@Override @SuppressWarnings("unchecked") public Mono<Long> remove(K key, long count, Object value) { Assert.notNull(key, "Key must not be null!"); return createMono(connection -> connection.lRem(rawKey(key), count, rawValue((V) value))); }
/** * Removes all occurrences of {@literal value} from the list stored at {@literal key}. * * @param key must not be {@literal null}. * @param value must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/lrem">Redis Documentation: LREM</a> */ default Mono<Long> lRem(ByteBuffer key, ByteBuffer value) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(value, "Value must not be null!"); return lRem(Mono.just(LRemCommand.all().occurrencesOf(value).from(key))).next().map(NumericResponse::getOutput); }
/** * Removes the first {@literal count} occurrences of {@literal value} from the list stored at {@literal key}. * * @param key must not be {@literal null}. * @param count must not be {@literal null}. * @param value must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/lrem">Redis Documentation: LREM</a> */ default Mono<Long> lRem(ByteBuffer key, Long count, ByteBuffer value) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(count, "Count must not be null!"); Assert.notNull(value, "Value must not be null!"); return lRem(Mono.just(LRemCommand.first(count).occurrencesOf(value).from(key))).next() .map(NumericResponse::getOutput); }
/** * Removes all occurrences of {@literal value} from the list stored at {@literal key}. * * @param key must not be {@literal null}. * @param value must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/lrem">Redis Documentation: LREM</a> */ default Mono<Long> lRem(ByteBuffer key, ByteBuffer value) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(value, "Value must not be null!"); return lRem(Mono.just(LRemCommand.all().occurrencesOf(value).from(key))).next().map(NumericResponse::getOutput); }
@Override @SuppressWarnings("unchecked") public Mono<Long> remove(K key, long count, Object value) { Assert.notNull(key, "Key must not be null!"); return createMono(connection -> connection.lRem(rawKey(key), count, rawValue((V) value))); }
/** * Removes the first {@literal count} occurrences of {@literal value} from the list stored at {@literal key}. * * @param key must not be {@literal null}. * @param count must not be {@literal null}. * @param value must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/lrem">Redis Documentation: LREM</a> */ default Mono<Long> lRem(ByteBuffer key, Long count, ByteBuffer value) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(count, "Count must not be null!"); Assert.notNull(value, "Value must not be null!"); return lRem(Mono.just(LRemCommand.first(count).occurrencesOf(value).from(key))).next() .map(NumericResponse::getOutput); }
@Override @SuppressWarnings("unchecked") public Mono<Long> remove(K key, long count, Object value) { Assert.notNull(key, "Key must not be null!"); return createMono(connection -> connection.lRem(rawKey(key), count, rawValue((V) value))); }