public interface ReactiveKeyCommands
Modifier and Type | Interface and Description |
---|---|
static class |
ReactiveKeyCommands.CopyCommand
MOVE command parameters. |
static class |
ReactiveKeyCommands.ExpireAtCommand
EXPIREAT /PEXPIREAT command parameters. |
static class |
ReactiveKeyCommands.ExpireCommand
EXPIRE /PEXPIRE command parameters. |
static class |
ReactiveKeyCommands.MoveCommand
MOVE command parameters. |
static class |
ReactiveKeyCommands.RenameCommand
RENAME command parameters. |
Modifier and Type | Method and Description |
---|---|
default reactor.core.publisher.Mono<Boolean> |
copy(ByteBuffer sourceKey,
ByteBuffer targetKey,
boolean replace)
Copy given
key to a target key . |
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.CopyCommand>> |
copy(org.reactivestreams.Publisher<ReactiveKeyCommands.CopyCommand> commands)
Copy keys one-by-one.
|
default reactor.core.publisher.Mono<Long> |
del(ByteBuffer key)
Delete key.
|
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> |
del(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys)
Delete keys one by one.
|
reactor.core.publisher.Mono<ValueEncoding> |
encodingOf(ByteBuffer key)
Get the type of internal representation used for storing the value at the given
key . |
default reactor.core.publisher.Mono<Boolean> |
exists(ByteBuffer key)
Determine if given key exists.
|
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveRedisConnection.KeyCommand>> |
exists(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys)
Determine if given key exists.
|
default reactor.core.publisher.Mono<Boolean> |
expire(ByteBuffer key,
Duration timeout)
Set time to live for given
key in seconds. |
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.ExpireCommand>> |
expire(org.reactivestreams.Publisher<ReactiveKeyCommands.ExpireCommand> commands)
Expire keys one by one.
|
default reactor.core.publisher.Mono<Boolean> |
expireAt(ByteBuffer key,
Instant expireAt)
Set the expiration for given
key as a UNIX timestamp. |
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.ExpireAtCommand>> |
expireAt(org.reactivestreams.Publisher<ReactiveKeyCommands.ExpireAtCommand> commands)
Set one-by-one the expiration for given
key as a UNIX timestamp. |
reactor.core.publisher.Mono<Duration> |
idletime(ByteBuffer key)
Get the
Duration since the object stored at the given key is idle. |
default reactor.core.publisher.Mono<List<ByteBuffer>> |
keys(ByteBuffer pattern)
Find all keys matching the given pattern.
|
reactor.core.publisher.Flux<ReactiveRedisConnection.MultiValueResponse<ByteBuffer,ByteBuffer>> |
keys(org.reactivestreams.Publisher<ByteBuffer> patterns)
Find all keys matching the given pattern.
|
default reactor.core.publisher.Mono<Long> |
mDel(List<ByteBuffer> keys)
Delete multiple keys one in one batch.
|
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<List<ByteBuffer>,Long>> |
mDel(org.reactivestreams.Publisher<List<ByteBuffer>> keys)
Delete multiple keys in batches.
|
default reactor.core.publisher.Mono<Boolean> |
move(ByteBuffer key,
int database)
Move given
key to database with index . |
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.MoveCommand>> |
move(org.reactivestreams.Publisher<ReactiveKeyCommands.MoveCommand> commands)
Move keys one-by-one between databases.
|
default reactor.core.publisher.Mono<Long> |
mUnlink(List<ByteBuffer> keys)
Unlink the
keys from the keyspace. |
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<List<ByteBuffer>,Long>> |
mUnlink(org.reactivestreams.Publisher<List<ByteBuffer>> keys)
Unlink the
keys from the keyspace. |
default reactor.core.publisher.Mono<Boolean> |
persist(ByteBuffer key)
Remove the expiration from given
key . |
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveRedisConnection.KeyCommand>> |
persist(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands)
Remove one-by-one the expiration from given
key . |
default reactor.core.publisher.Mono<Boolean> |
pExpire(ByteBuffer key,
Duration timeout)
Set time to live for given
key in milliseconds. |
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.ExpireCommand>> |
pExpire(org.reactivestreams.Publisher<ReactiveKeyCommands.ExpireCommand> commands)
Expire keys one by one.
|
default reactor.core.publisher.Mono<Boolean> |
pExpireAt(ByteBuffer key,
Instant expireAt)
Set the expiration for given
key as a UNIX timestamp. |
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.ExpireAtCommand>> |
pExpireAt(org.reactivestreams.Publisher<ReactiveKeyCommands.ExpireAtCommand> commands)
Set one-by-one the expiration for given
key as a UNIX timestamp in milliseconds. |
default reactor.core.publisher.Mono<Long> |
pTtl(ByteBuffer key)
Get the time to live for
key in milliseconds. |
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> |
pTtl(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands)
Get one-by-one the time to live for keys.
|
reactor.core.publisher.Mono<ByteBuffer> |
randomKey()
Return a random key from the keyspace.
|
reactor.core.publisher.Mono<Long> |
refcount(ByteBuffer key)
Get the number of references of the value associated with the specified
key . |
default reactor.core.publisher.Mono<Boolean> |
rename(ByteBuffer oldKey,
ByteBuffer newKey)
Rename key oldKey to newKey.
|
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.RenameCommand>> |
rename(org.reactivestreams.Publisher<ReactiveKeyCommands.RenameCommand> command)
Rename key oldKey to newKey.
|
default reactor.core.publisher.Mono<Boolean> |
renameNX(ByteBuffer key,
ByteBuffer newKey)
Rename key oldKey to newKey only if newKey does not exist.
|
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.RenameCommand>> |
renameNX(org.reactivestreams.Publisher<ReactiveKeyCommands.RenameCommand> command)
Rename key oldKey to newKey only if newKey does not exist.
|
default reactor.core.publisher.Flux<ByteBuffer> |
scan()
Use a
Flux to iterate over keys. |
default reactor.core.publisher.Flux<ByteBuffer> |
scan(KeyScanOptions options)
Use a
Flux to iterate over keys. |
reactor.core.publisher.Flux<ByteBuffer> |
scan(ScanOptions options)
Use a
Flux to iterate over keys. |
default reactor.core.publisher.Mono<Long> |
touch(Collection<ByteBuffer> keys)
Alter the last access time of given
key(s) . |
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<Collection<ByteBuffer>,Long>> |
touch(org.reactivestreams.Publisher<Collection<ByteBuffer>> keys)
Alter the last access time of given
key(s) . |
default reactor.core.publisher.Mono<Long> |
ttl(ByteBuffer key)
Get the time to live for
key in seconds. |
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> |
ttl(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands)
Get one-by-one the time to live for keys.
|
default reactor.core.publisher.Mono<DataType> |
type(ByteBuffer key)
Determine the type stored at key.
|
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,DataType>> |
type(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys)
Determine the type stored at key.
|
default reactor.core.publisher.Mono<Long> |
unlink(ByteBuffer key)
Unlink the
key from the keyspace. |
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> |
unlink(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys)
Unlink the
key from the keyspace. |
default reactor.core.publisher.Mono<Boolean> copy(ByteBuffer sourceKey, ByteBuffer targetKey, boolean replace)
key
to a target key
.sourceKey
- must not be null.targetKey
- must not be null.replace
- whether to replace existing keys.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.CopyCommand>> copy(org.reactivestreams.Publisher<ReactiveKeyCommands.CopyCommand> commands)
commands
- must not be null.Flux
of ReactiveRedisConnection.BooleanResponse
holding the key to move along with the copy result.default reactor.core.publisher.Mono<Boolean> exists(ByteBuffer key)
key
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveRedisConnection.KeyCommand>> exists(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys)
keys
- must not be null.default reactor.core.publisher.Mono<DataType> type(ByteBuffer key)
key
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,DataType>> type(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys)
keys
- must not be null.default reactor.core.publisher.Mono<Long> touch(Collection<ByteBuffer> keys)
key(s)
.keys
- must not be null.Mono
emitting the number of keys touched.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<Collection<ByteBuffer>,Long>> touch(org.reactivestreams.Publisher<Collection<ByteBuffer>> keys)
key(s)
.keys
- must not be null.default reactor.core.publisher.Mono<List<ByteBuffer>> keys(ByteBuffer pattern)
scan(ScanOptions)
to iterate over the keyspace as keys(ByteBuffer)
is a
non-interruptible and expensive Redis operation.pattern
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.MultiValueResponse<ByteBuffer,ByteBuffer>> keys(org.reactivestreams.Publisher<ByteBuffer> patterns)
scan(ScanOptions)
to iterate over the keyspace as keys(Publisher)
is a
non-interruptible and expensive Redis operation.patterns
- must not be null.default reactor.core.publisher.Flux<ByteBuffer> scan()
Flux
to iterate over keys. The resulting Flux
acts as a cursor and issues SCAN
commands itself as long as the subscriber signals demand.default reactor.core.publisher.Flux<ByteBuffer> scan(KeyScanOptions options)
Flux
to iterate over keys. The resulting Flux
acts as a cursor and issues SCAN
commands itself as long as the subscriber signals demand.options
- must not be null.Flux
emitting keys
one by one.IllegalArgumentException
- when options is null.reactor.core.publisher.Flux<ByteBuffer> scan(ScanOptions options)
Flux
to iterate over keys. The resulting Flux
acts as a cursor and issues SCAN
commands itself as long as the subscriber signals demand.options
- must not be null.Flux
emitting keys
one by one.IllegalArgumentException
- when options is null.reactor.core.publisher.Mono<ByteBuffer> randomKey()
default reactor.core.publisher.Mono<Boolean> rename(ByteBuffer oldKey, ByteBuffer newKey)
oldKey
- must not be null.newKey
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.RenameCommand>> rename(org.reactivestreams.Publisher<ReactiveKeyCommands.RenameCommand> command)
command
- must not be null.default reactor.core.publisher.Mono<Boolean> renameNX(ByteBuffer key, ByteBuffer newKey)
key
- must not be null.newKey
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.RenameCommand>> renameNX(org.reactivestreams.Publisher<ReactiveKeyCommands.RenameCommand> command)
command
- must not be null.default reactor.core.publisher.Mono<Long> del(ByteBuffer key)
key
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> del(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys)
keys
- must not be null.Flux
of ReactiveRedisConnection.NumericResponse
holding the key removed along with the deletion result.default reactor.core.publisher.Mono<Long> mDel(List<ByteBuffer> keys)
keys
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<List<ByteBuffer>,Long>> mDel(org.reactivestreams.Publisher<List<ByteBuffer>> keys)
keys
- must not be null.Flux
of ReactiveRedisConnection.NumericResponse
holding the keys removed along with the deletion result.default reactor.core.publisher.Mono<Long> unlink(ByteBuffer key)
key
from the keyspace. Unlike with del(ByteBuffer)
the actual memory reclaiming here
happens asynchronously.key
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> unlink(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys)
key
from the keyspace. Unlike with del(ByteBuffer)
the actual memory reclaiming here
happens asynchronously.keys
- must not be null.Flux
of ReactiveRedisConnection.NumericResponse
holding the key removed along with the unlink result.default reactor.core.publisher.Mono<Long> mUnlink(List<ByteBuffer> keys)
keys
from the keyspace. Unlike with mDel(List)
the actual memory reclaiming here
happens asynchronously.keys
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<List<ByteBuffer>,Long>> mUnlink(org.reactivestreams.Publisher<List<ByteBuffer>> keys)
keys
from the keyspace. Unlike with mDel(Publisher)
the actual memory reclaiming here
happens asynchronously.keys
- must not be null.Flux
of ReactiveRedisConnection.NumericResponse
holding the key removed along with the deletion result.default reactor.core.publisher.Mono<Boolean> expire(ByteBuffer key, Duration timeout)
key
in seconds.key
- must not be null.timeout
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.ExpireCommand>> expire(org.reactivestreams.Publisher<ReactiveKeyCommands.ExpireCommand> commands)
commands
- must not be null.Flux
of ReactiveRedisConnection.BooleanResponse
holding the key removed along with the expiration
result.default reactor.core.publisher.Mono<Boolean> pExpire(ByteBuffer key, Duration timeout)
key
in milliseconds.key
- must not be null.timeout
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.ExpireCommand>> pExpire(org.reactivestreams.Publisher<ReactiveKeyCommands.ExpireCommand> commands)
commands
- must not be null.Flux
of ReactiveRedisConnection.BooleanResponse
holding the key removed along with the expiration
result.default reactor.core.publisher.Mono<Boolean> expireAt(ByteBuffer key, Instant expireAt)
key
as a UNIX timestamp.key
- must not be null.expireAt
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.ExpireAtCommand>> expireAt(org.reactivestreams.Publisher<ReactiveKeyCommands.ExpireAtCommand> commands)
key
as a UNIX timestamp.commands
- must not be null.Flux
of ReactiveRedisConnection.BooleanResponse
holding the key removed along with the expiration
result.default reactor.core.publisher.Mono<Boolean> pExpireAt(ByteBuffer key, Instant expireAt)
key
as a UNIX timestamp.key
- must not be null.expireAt
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.ExpireAtCommand>> pExpireAt(org.reactivestreams.Publisher<ReactiveKeyCommands.ExpireAtCommand> commands)
key
as a UNIX timestamp in milliseconds.commands
- must not be null.Flux
of ReactiveRedisConnection.BooleanResponse
holding the key removed along with the expiration
result.default reactor.core.publisher.Mono<Boolean> persist(ByteBuffer key)
key
.key
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveRedisConnection.KeyCommand>> persist(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands)
key
.commands
- must not be null.Flux
of ReactiveRedisConnection.BooleanResponse
holding the key persisted along with the persist result.default reactor.core.publisher.Mono<Long> ttl(ByteBuffer key)
key
in seconds.key
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> ttl(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands)
commands
- must not be null.Flux
of ReactiveRedisConnection.NumericResponse
holding the key along with the time to live result.default reactor.core.publisher.Mono<Long> pTtl(ByteBuffer key)
key
in milliseconds.key
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> pTtl(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands)
commands
- must not be null.Flux
of ReactiveRedisConnection.NumericResponse
holding the key along with the time to live result.default reactor.core.publisher.Mono<Boolean> move(ByteBuffer key, int database)
key
to database with index
.key
- must not be null.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveKeyCommands.MoveCommand>> move(org.reactivestreams.Publisher<ReactiveKeyCommands.MoveCommand> commands)
commands
- must not be null.Flux
of ReactiveRedisConnection.BooleanResponse
holding the key to move along with the move result.reactor.core.publisher.Mono<ValueEncoding> encodingOf(ByteBuffer key)
key
.key
- must not be null.Mono
emitting ValueEncoding
.IllegalArgumentException
- if key
is null.reactor.core.publisher.Mono<Duration> idletime(ByteBuffer key)
Duration
since the object stored at the given key
is idle.key
- must not be null.Mono
emitting the idletime of the key of Mono.empty()
if the key does not exist.IllegalArgumentException
- if key
is null.reactor.core.publisher.Mono<Long> refcount(ByteBuffer key)
key
.key
- must not be null.Mono.empty()
if key does not exist.IllegalArgumentException
- if key
is null.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.