public interface RKeysReactive
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Boolean> |
clearExpire(String name)
Clear an expire timeout or expire date for object.
|
reactor.core.publisher.Mono<Void> |
copy(String name,
String host,
int port,
int database,
long timeout)
Copy object from source Redis instance to destination Redis instance
|
reactor.core.publisher.Mono<Long> |
count()
Returns the number of keys in the currently-selected database
|
reactor.core.publisher.Mono<Long> |
countExists(String... names)
Checks if provided keys exist
|
reactor.core.publisher.Mono<Long> |
delete(String... keys)
Delete multiple objects by name.
|
reactor.core.publisher.Mono<Long> |
deleteByPattern(String pattern)
Delete multiple objects by a key pattern.
|
reactor.core.publisher.Mono<Boolean> |
expire(String name,
long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
reactor.core.publisher.Mono<Boolean> |
expireAt(String name,
long timestamp)
Set an expire date for object.
|
reactor.core.publisher.Mono<Collection<String>> |
findKeysByPattern(String pattern)
Find keys by key search pattern by one Redis call.
|
reactor.core.publisher.Mono<Void> |
flushall()
Delete all the keys of all the existing databases
Uses
FLUSHALL Redis command. |
reactor.core.publisher.Mono<Void> |
flushdb()
Delete all the keys of the currently selected database
Uses
FLUSHDB Redis command. |
reactor.core.publisher.Flux<String> |
getKeys()
Load keys in incrementally iterate mode.
|
reactor.core.publisher.Flux<String> |
getKeys(int count)
Load keys in incrementally iterate mode.
|
reactor.core.publisher.Flux<String> |
getKeysByPattern(String pattern)
Find keys by pattern and load it in incrementally iterate mode.
|
reactor.core.publisher.Flux<String> |
getKeysByPattern(String pattern,
int count)
Get all keys by pattern using iterator.
|
reactor.core.publisher.Mono<Integer> |
getSlot(String key)
Get hash slot identifier for key.
|
reactor.core.publisher.Mono<RType> |
getType(String key)
Get Redis object type by key
|
reactor.core.publisher.Mono<Void> |
migrate(String name,
String host,
int port,
int database,
long timeout)
Transfer object from source Redis instance to destination Redis instance
|
reactor.core.publisher.Mono<Boolean> |
move(String name,
int database)
Move object to another database
|
reactor.core.publisher.Mono<String> |
randomKey()
Get random key
Uses
RANDOM_KEY Redis command. |
reactor.core.publisher.Mono<Long> |
remainTimeToLive(String name)
Remaining time to live of Redisson object that has a timeout
|
reactor.core.publisher.Mono<Void> |
rename(String currentName,
String newName)
Rename current object key to
newName |
reactor.core.publisher.Mono<Boolean> |
renamenx(String oldName,
String newName)
Rename object with
oldName to newName
only if new key is not exists |
reactor.core.publisher.Mono<Long> |
touch(String... names)
Update the last access time of an object.
|
reactor.core.publisher.Mono<Long> |
unlink(String... keys)
Delete multiple objects by name.
|
reactor.core.publisher.Mono<Boolean> move(String name, int database)
name
- of objectdatabase
- - Redis database numbertrue
if key was moved else false
reactor.core.publisher.Mono<Void> migrate(String name, String host, int port, int database, long timeout)
name
- of objecthost
- - destination hostport
- - destination portdatabase
- - destination databasetimeout
- - maximum idle time in any moment of the communication with the destination instance in millisecondsreactor.core.publisher.Mono<Void> copy(String name, String host, int port, int database, long timeout)
name
- of objecthost
- - destination hostport
- - destination portdatabase
- - destination databasetimeout
- - maximum idle time in any moment of the communication with the destination instance in millisecondsreactor.core.publisher.Mono<Boolean> expire(String name, long timeToLive, TimeUnit timeUnit)
name
- of objecttimeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unittrue
if the timeout was set and false
if notreactor.core.publisher.Mono<Boolean> expireAt(String name, long timestamp)
name
- of objecttimestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notreactor.core.publisher.Mono<Boolean> clearExpire(String name)
name
- of objecttrue
if timeout was removed
false
if object does not exist or does not have an associated timeoutreactor.core.publisher.Mono<Boolean> renamenx(String oldName, String newName)
oldName
to newName
only if new key is not existsoldName
- - old name of objectnewName
- - new name of objecttrue
if object has been renamed successfully and false
otherwisereactor.core.publisher.Mono<Void> rename(String currentName, String newName)
newName
currentName
- - current name of objectnewName
- - new name of objectreactor.core.publisher.Mono<Long> remainTimeToLive(String name)
name
- of keyreactor.core.publisher.Mono<Long> touch(String... names)
names
- of keysreactor.core.publisher.Mono<Long> countExists(String... names)
names
- of keysreactor.core.publisher.Mono<RType> getType(String key)
key
- - name of keyreactor.core.publisher.Flux<String> getKeys()
reactor.core.publisher.Flux<String> getKeys(int count)
count
keys per request.count
- - keys loaded per request to Redisreactor.core.publisher.Flux<String> getKeysByPattern(String pattern)
Supported glob-style patterns: h?llo subscribes to hello, hallo and hxllo h*llo subscribes to hllo and heeeello h[ae]llo subscribes to hello and hallo, but not hillo
pattern
- - match patternreactor.core.publisher.Flux<String> getKeysByPattern(String pattern, int count)
count
keys per request.
Supported glob-style patterns:
h?llo subscribes to hello, hallo and hxllo
h*llo subscribes to hllo and heeeello
h[ae]llo subscribes to hello and hallo, but not hillo
pattern
- - match patterncount
- - keys loaded per request to Redisreactor.core.publisher.Mono<Integer> getSlot(String key)
KEYSLOT
Redis command.key
- - name of keyreactor.core.publisher.Mono<Collection<String>> findKeysByPattern(String pattern)
KEYS
Redis command.
Supported glob-style patterns:
h?llo subscribes to hello, hallo and hxllo
h*llo subscribes to hllo and heeeello
h[ae]llo subscribes to hello and hallo, but not hillopattern
- - match patternreactor.core.publisher.Mono<String> randomKey()
RANDOM_KEY
Redis command.reactor.core.publisher.Mono<Long> deleteByPattern(String pattern)
pattern
- - match patternreactor.core.publisher.Mono<Long> delete(String... keys)
DEL
Redis command.keys
- - object namesreactor.core.publisher.Mono<Long> unlink(String... keys)
Requires Redis 4.0+
keys
- of objectsreactor.core.publisher.Mono<Long> count()
reactor.core.publisher.Mono<Void> flushdb()
FLUSHDB
Redis command.reactor.core.publisher.Mono<Void> flushall()
FLUSHALL
Redis command.Copyright © 2014–2019 The Redisson Project. All rights reserved.