public interface RObjectReactive
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Integer> |
addListener(ObjectListener listener)
Adds object event listener
|
reactor.core.publisher.Mono<Void> |
copy(String host,
int port,
int database,
long timeout)
Copy object from source Redis instance to destination Redis instance
|
reactor.core.publisher.Mono<Boolean> |
delete()
Delete object in mode
|
reactor.core.publisher.Mono<byte[]> |
dump()
Returns dump of object
|
Codec |
getCodec() |
String |
getName() |
reactor.core.publisher.Mono<Boolean> |
isExists()
Check object existence
|
reactor.core.publisher.Mono<Void> |
migrate(String host,
int port,
int database,
long timeout)
Transfer a object from a source Redis instance to a destination Redis instance
in mode
|
reactor.core.publisher.Mono<Boolean> |
move(int database)
Move object to another database in mode
|
reactor.core.publisher.Mono<Void> |
removeListener(int listenerId)
Removes object event listener
|
reactor.core.publisher.Mono<Void> |
rename(String newName)
Rename current object key to
newName
in mode |
reactor.core.publisher.Mono<Boolean> |
renamenx(String newName)
Rename current object key to
newName
in mode only if new key is not exists |
reactor.core.publisher.Mono<Void> |
restore(byte[] state)
Restores object using its state returned by
dump() method. |
reactor.core.publisher.Mono<Void> |
restore(byte[] state,
long timeToLive,
TimeUnit timeUnit)
Restores object using its state returned by
dump() method and set time to live for it. |
reactor.core.publisher.Mono<Void> |
restoreAndReplace(byte[] state)
Restores and replaces object if it already exists.
|
reactor.core.publisher.Mono<Void> |
restoreAndReplace(byte[] state,
long timeToLive,
TimeUnit timeUnit)
Restores and replaces object if it already exists and set time to live for it.
|
reactor.core.publisher.Mono<Boolean> |
touch()
Update the last access time of an object.
|
reactor.core.publisher.Mono<Boolean> |
unlink()
Delete the objects.
|
String getName()
Codec getCodec()
reactor.core.publisher.Mono<Void> restore(byte[] state)
dump()
method.state
- - state of objectreactor.core.publisher.Mono<Void> restore(byte[] state, long timeToLive, TimeUnit timeUnit)
dump()
method and set time to live for it.state
- - state of objecttimeToLive
- - time to live of the objecttimeUnit
- - time unitreactor.core.publisher.Mono<Void> restoreAndReplace(byte[] state)
state
- - state of the objectreactor.core.publisher.Mono<Void> restoreAndReplace(byte[] state, long timeToLive, TimeUnit timeUnit)
state
- - state of the objecttimeToLive
- - time to live of the objecttimeUnit
- - time unitreactor.core.publisher.Mono<byte[]> dump()
reactor.core.publisher.Mono<Boolean> touch()
true
if object was touched else false
reactor.core.publisher.Mono<Boolean> unlink()
Requires Redis 4.0+
true
if it was exist and deleted else false
reactor.core.publisher.Mono<Void> copy(String host, int port, int database, long timeout)
host
- - 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> migrate(String host, int port, int database, long timeout)
host
- - 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> move(int database)
database
- - number of Redis databasetrue
if key was moved false
if notreactor.core.publisher.Mono<Boolean> delete()
true
if object was deleted false
if notreactor.core.publisher.Mono<Void> rename(String newName)
newName
in modenewName
- - new name of objectreactor.core.publisher.Mono<Boolean> renamenx(String newName)
newName
in mode only if new key is not existsnewName
- - new name of objecttrue
if object has been renamed successfully and false
otherwisereactor.core.publisher.Mono<Boolean> isExists()
true
if object exists and false
otherwisereactor.core.publisher.Mono<Integer> addListener(ObjectListener listener)
listener
- - object event listenerExpiredObjectListener
,
DeletedObjectListener
reactor.core.publisher.Mono<Void> removeListener(int listenerId)
listenerId
- - listener idCopyright © 2014–2019 The Redisson Project. All rights reserved.