public class RedissonKeysReactive extends Object implements RKeysReactive
| Constructor and Description |
|---|
RedissonKeysReactive(CommandReactiveService commandExecutor) |
| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<Boolean> |
clearExpire(String name)
Clear an expire timeout or expire date for object.
|
org.reactivestreams.Publisher<Void> |
copy(String name,
String host,
int port,
int database,
long timeout)
Copy object from source Redis instance to destination Redis instance
|
org.reactivestreams.Publisher<Long> |
count()
Returns the number of keys in the currently-selected database
|
org.reactivestreams.Publisher<Long> |
countExists(String... names)
Checks if provided keys exist
|
org.reactivestreams.Publisher<Long> |
delete(String... keys)
Delete multiple objects by name.
|
org.reactivestreams.Publisher<Long> |
deleteByPattern(String pattern)
Delete multiple objects by a key pattern.
|
org.reactivestreams.Publisher<Boolean> |
expire(String name,
long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
org.reactivestreams.Publisher<Boolean> |
expireAt(String name,
long timestamp)
Set an expire date for object.
|
org.reactivestreams.Publisher<Collection<String>> |
findKeysByPattern(String pattern)
Find keys by key search pattern by one Redis call.
|
org.reactivestreams.Publisher<Void> |
flushall()
Delete all the keys of all the existing databases
Uses
FLUSHALL Redis command. |
org.reactivestreams.Publisher<Void> |
flushdb()
Delete all the keys of the currently selected database
Uses
FLUSHDB Redis command. |
org.reactivestreams.Publisher<String> |
getKeys()
Load keys in incrementally iterate mode.
|
org.reactivestreams.Publisher<String> |
getKeys(int count)
Load keys in incrementally iterate mode.
|
org.reactivestreams.Publisher<String> |
getKeysByPattern(String pattern)
Find keys by pattern and load it in incrementally iterate mode.
|
org.reactivestreams.Publisher<String> |
getKeysByPattern(String pattern,
int count)
Get all keys by pattern using iterator.
|
org.reactivestreams.Publisher<Integer> |
getSlot(String key)
Get hash slot identifier for key.
|
org.reactivestreams.Publisher<RType> |
getType(String key)
Get Redis object type by key
|
org.reactivestreams.Publisher<Void> |
migrate(String name,
String host,
int port,
int database,
long timeout)
Transfer object from source Redis instance to destination Redis instance
|
org.reactivestreams.Publisher<Boolean> |
move(String name,
int database)
Move object to another database
|
org.reactivestreams.Publisher<String> |
randomKey()
Get random key
Uses
RANDOM_KEY Redis command. |
org.reactivestreams.Publisher<Long> |
remainTimeToLive(String name)
Remaining time to live of Redisson object that has a timeout
|
org.reactivestreams.Publisher<Void> |
rename(String currentName,
String newName)
Rename current object key to
newName |
org.reactivestreams.Publisher<Boolean> |
renamenx(String oldName,
String newName)
Rename object with
oldName to newName
only if new key is not exists |
org.reactivestreams.Publisher<Long> |
touch(String... names)
Update the last access time of an object.
|
org.reactivestreams.Publisher<Long> |
unlink(String... keys)
Delete multiple objects by name.
|
public RedissonKeysReactive(CommandReactiveService commandExecutor)
public org.reactivestreams.Publisher<Integer> getSlot(String key)
RKeysReactiveKEYSLOT Redis command.getSlot in interface RKeysReactivekey - - name of keypublic org.reactivestreams.Publisher<String> getKeysByPattern(String pattern)
RKeysReactiveSupported 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
getKeysByPattern in interface RKeysReactivepattern - - match patternpublic org.reactivestreams.Publisher<String> getKeysByPattern(String pattern, int count)
RKeysReactivecount 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
getKeysByPattern in interface RKeysReactivepattern - - match patterncount - - keys loaded per request to Redispublic org.reactivestreams.Publisher<String> getKeys()
RKeysReactivegetKeys in interface RKeysReactivepublic org.reactivestreams.Publisher<String> getKeys(int count)
RKeysReactivecount keys per request.getKeys in interface RKeysReactivecount - - keys loaded per request to Redispublic org.reactivestreams.Publisher<Collection<String>> findKeysByPattern(String pattern)
RKeysReactiveKEYS 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 hillofindKeysByPattern in interface RKeysReactivepattern - - match patternpublic org.reactivestreams.Publisher<String> randomKey()
RKeysReactiveRANDOM_KEY Redis command.randomKey in interface RKeysReactivepublic org.reactivestreams.Publisher<Long> deleteByPattern(String pattern)
RKeysReactivedeleteByPattern in interface RKeysReactivepattern - - match patternpublic org.reactivestreams.Publisher<Long> delete(String... keys)
RKeysReactiveDEL Redis command.delete in interface RKeysReactivekeys - - object namespublic org.reactivestreams.Publisher<Void> flushdb()
RKeysReactiveFLUSHDB Redis command.flushdb in interface RKeysReactivepublic org.reactivestreams.Publisher<Void> flushall()
RKeysReactiveFLUSHALL Redis command.flushall in interface RKeysReactivepublic org.reactivestreams.Publisher<Boolean> move(String name, int database)
RKeysReactivemove in interface RKeysReactivename - of objectdatabase - - Redis database numbertrue if key was moved else falsepublic org.reactivestreams.Publisher<Void> migrate(String name, String host, int port, int database, long timeout)
RKeysReactivemigrate in interface RKeysReactivename - of objecthost - - destination hostport - - destination portdatabase - - destination databasetimeout - - maximum idle time in any moment of the communication with the destination instance in millisecondspublic org.reactivestreams.Publisher<Void> copy(String name, String host, int port, int database, long timeout)
RKeysReactivecopy in interface RKeysReactivename - of objecthost - - destination hostport - - destination portdatabase - - destination databasetimeout - - maximum idle time in any moment of the communication with the destination instance in millisecondspublic org.reactivestreams.Publisher<Boolean> expire(String name, long timeToLive, TimeUnit timeUnit)
RKeysReactiveexpire in interface RKeysReactivename - of objecttimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic org.reactivestreams.Publisher<Boolean> expireAt(String name, long timestamp)
RKeysReactiveexpireAt in interface RKeysReactivename - of objecttimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic org.reactivestreams.Publisher<Boolean> clearExpire(String name)
RKeysReactiveclearExpire in interface RKeysReactivename - of objecttrue if timeout was removed
false if object does not exist or does not have an associated timeoutpublic org.reactivestreams.Publisher<Boolean> renamenx(String oldName, String newName)
RKeysReactiveoldName to newName
only if new key is not existsrenamenx in interface RKeysReactiveoldName - - old name of objectnewName - - new name of objecttrue if object has been renamed successfully and false otherwisepublic org.reactivestreams.Publisher<Void> rename(String currentName, String newName)
RKeysReactivenewNamerename in interface RKeysReactivecurrentName - - current name of objectnewName - - new name of objectpublic org.reactivestreams.Publisher<Long> remainTimeToLive(String name)
RKeysReactiveremainTimeToLive in interface RKeysReactivename - of keypublic org.reactivestreams.Publisher<Long> touch(String... names)
RKeysReactivetouch in interface RKeysReactivenames - of keyspublic org.reactivestreams.Publisher<Long> countExists(String... names)
RKeysReactivecountExists in interface RKeysReactivenames - of keyspublic org.reactivestreams.Publisher<RType> getType(String key)
RKeysReactivegetType in interface RKeysReactivekey - - name of keypublic org.reactivestreams.Publisher<Long> unlink(String... keys)
RKeysReactiveRequires Redis 4.0+
unlink in interface RKeysReactivekeys - of objectspublic org.reactivestreams.Publisher<Long> count()
RKeysReactivecount in interface RKeysReactiveCopyright © 2014–2018 The Redisson Project. All rights reserved.