Java Code Examples for org.springframework.data.redis.connection.ReactiveRedisConnection#KeyCommand
The following examples show how to use
org.springframework.data.redis.connection.ReactiveRedisConnection#KeyCommand .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RedissonReactiveStreamCommands.java From redisson with Apache License 2.0 | 5 votes |
@Override public Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand, Long>> xLen(Publisher<ReactiveRedisConnection.KeyCommand> publisher) { return execute(publisher, command -> { Assert.notNull(command.getKey(), "Key must not be null!"); byte[] k = toByteArray(command.getKey()); Mono<Long> m = write(k, StringCodec.INSTANCE, RedisCommands.XLEN, k); return m.map(v -> new ReactiveRedisConnection.NumericResponse<>(command, v)); }); }
Example 2
Source File: RedissonReactiveStreamCommands.java From redisson with Apache License 2.0 | 5 votes |
@Override public Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand, Long>> xTrim(Publisher<TrimCommand> publisher) { return execute(publisher, command -> { Assert.notNull(command.getKey(), "Key must not be null!"); Assert.notNull(command.getCount(), "Count must not be null!"); byte[] k = toByteArray(command.getKey()); Mono<Long> m = write(k, StringCodec.INSTANCE, RedisCommands.XTRIM, k, "MAXLEN", command.getCount()); return m.map(v -> new ReactiveRedisConnection.NumericResponse<>(command, v)); }); }
Example 3
Source File: RedissonReactiveStreamCommands.java From redisson with Apache License 2.0 | 5 votes |
@Override public Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand, Long>> xLen(Publisher<ReactiveRedisConnection.KeyCommand> publisher) { return execute(publisher, command -> { Assert.notNull(command.getKey(), "Key must not be null!"); byte[] k = toByteArray(command.getKey()); Mono<Long> m = write(k, StringCodec.INSTANCE, RedisCommands.XLEN, k); return m.map(v -> new ReactiveRedisConnection.NumericResponse<>(command, v)); }); }
Example 4
Source File: RedissonReactiveStreamCommands.java From redisson with Apache License 2.0 | 5 votes |
@Override public Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand, Long>> xTrim(Publisher<TrimCommand> publisher) { return execute(publisher, command -> { Assert.notNull(command.getKey(), "Key must not be null!"); Assert.notNull(command.getCount(), "Count must not be null!"); byte[] k = toByteArray(command.getKey()); Mono<Long> m = write(k, StringCodec.INSTANCE, RedisCommands.XTRIM, k, "MAXLEN", command.getCount()); return m.map(v -> new ReactiveRedisConnection.NumericResponse<>(command, v)); }); }