public interface RKeysAsync
Modifier and Type | Method and Description |
---|---|
RFuture<Boolean> |
clearExpireAsync(String name)
Clear an expire timeout or expire date for object.
|
RFuture<Long> |
countAsync()
Returns the number of keys in the currently-selected database in async mode
|
RFuture<Long> |
countExistsAsync(String... names)
Checks if provided keys exist
|
RFuture<Long> |
deleteAsync(RObject... objects)
Delete multiple objects
|
RFuture<Long> |
deleteAsync(String... keys)
Delete multiple objects by name
|
RFuture<Long> |
deleteByPatternAsync(String pattern)
Delete multiple objects by a key pattern.
|
RFuture<Boolean> |
expireAsync(String name,
long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
RFuture<Boolean> |
expireAtAsync(String name,
long timestamp)
Set an expire date for object.
|
RFuture<Collection<String>> |
findKeysByPatternAsync(String pattern)
Find keys by key search pattern in async mode
Supported glob-style patterns:
h?
|
RFuture<Void> |
flushallAsync()
Delete all keys of all existing databases
|
RFuture<Void> |
flushdbAsync()
Delete all keys of currently selected database
|
RFuture<Integer> |
getSlotAsync(String key)
Get hash slot identifier for key in async mode.
|
RFuture<RType> |
getTypeAsync(String key)
Get Redis object type by key
|
RFuture<Void> |
migrateAsync(String name,
String host,
int port,
int database)
Transfer an object from source Redis instance to destination Redis instance
|
RFuture<Boolean> |
moveAsync(String name,
int database)
Move object to another database
|
RFuture<String> |
randomKeyAsync()
Get random key in async mode
|
RFuture<Long> |
remainTimeToLiveAsync(String name)
Remaining time to live of Redisson object that has a timeout
|
RFuture<Void> |
renameAsync(String currentName,
String newName)
Rename current object key to
newName |
RFuture<Boolean> |
renamenxAsync(String oldName,
String newName)
Rename object with
oldName to newName
only if new key is not exists |
RFuture<Long> |
touchAsync(String... names)
Update the last access time of an object.
|
RFuture<Boolean> moveAsync(String name, int database)
name
- of objectdatabase
- - Redis database numbertrue
if key was moved else false
RFuture<Void> migrateAsync(String name, String host, int port, int database)
name
- of objecthost
- - destination hostport
- - destination portdatabase
- - destination databaseRFuture<Boolean> expireAsync(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 notRFuture<Boolean> expireAtAsync(String name, long timestamp)
name
- of objecttimestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notRFuture<Boolean> clearExpireAsync(String name)
name
- of objecttrue
if timeout was removed
false
if object does not exist or does not have an associated timeoutRFuture<Boolean> renamenxAsync(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
otherwiseRFuture<Void> renameAsync(String currentName, String newName)
newName
currentName
- - current name of objectnewName
- - new name of objectRFuture<Long> remainTimeToLiveAsync(String name)
name
- of keyRFuture<Long> touchAsync(String... names)
names
- of keysRFuture<Long> countExistsAsync(String... names)
names
- of keysRFuture<RType> getTypeAsync(String key)
key
- - name of keyRFuture<Integer> getSlotAsync(String key)
key
- - name of keyRFuture<Collection<String>> findKeysByPatternAsync(String pattern)
pattern
- - match patternRFuture<Long> deleteByPatternAsync(String pattern)
Method executes in NON atomic way in cluster mode due to lua script limitations.
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 patternRFuture<Long> deleteAsync(RObject... objects)
objects
- of RedissonRFuture<Long> deleteAsync(String... keys)
keys
- - object namesRFuture<Long> countAsync()
RFuture<Void> flushdbAsync()
Copyright © 2014–2017 The Redisson Project. All rights reserved.