public interface RObjectRx
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.rxjava3.core.Single<Integer> |
addListener(ObjectListener listener)
Adds object event listener
|
io.reactivex.rxjava3.core.Completable |
copy(String host,
int port,
int database,
long timeout)
Copy object from source Redis instance to destination Redis instance
|
io.reactivex.rxjava3.core.Single<Boolean> |
delete()
Delete object in mode
|
io.reactivex.rxjava3.core.Single<byte[]> |
dump()
Returns dump of object
|
Codec |
getCodec() |
io.reactivex.rxjava3.core.Single<Long> |
getIdleTime()
Returns number of seconds spent since last write or read operation over this object.
|
String |
getName() |
io.reactivex.rxjava3.core.Single<Boolean> |
isExists()
Check object existence
|
io.reactivex.rxjava3.core.Completable |
migrate(String host,
int port,
int database,
long timeout)
Transfer a object from a source Redis instance to a destination Redis instance
in mode
|
io.reactivex.rxjava3.core.Single<Boolean> |
move(int database)
Move object to another database in mode
|
io.reactivex.rxjava3.core.Completable |
removeListener(int listenerId)
Removes object event listener
|
io.reactivex.rxjava3.core.Completable |
rename(String newName)
Rename current object key to
newName
in mode |
io.reactivex.rxjava3.core.Single<Boolean> |
renamenx(String newName)
Rename current object key to
newName
in mode only if new key is not exists |
io.reactivex.rxjava3.core.Completable |
restore(byte[] state)
Restores object using its state returned by
dump() method. |
io.reactivex.rxjava3.core.Completable |
restore(byte[] state,
long timeToLive,
TimeUnit timeUnit)
Restores object using its state returned by
dump() method and set time to live for it. |
io.reactivex.rxjava3.core.Completable |
restoreAndReplace(byte[] state)
Restores and replaces object if it already exists.
|
io.reactivex.rxjava3.core.Completable |
restoreAndReplace(byte[] state,
long timeToLive,
TimeUnit timeUnit)
Restores and replaces object if it already exists and set time to live for it.
|
io.reactivex.rxjava3.core.Single<Long> |
sizeInMemory()
Returns bytes amount used by object in Redis memory.
|
io.reactivex.rxjava3.core.Single<Boolean> |
touch()
Update the last access time of an object.
|
io.reactivex.rxjava3.core.Single<Boolean> |
unlink()
Delete the objects.
|
io.reactivex.rxjava3.core.Single<Long> getIdleTime()
String getName()
Codec getCodec()
io.reactivex.rxjava3.core.Single<Long> sizeInMemory()
io.reactivex.rxjava3.core.Completable restore(byte[] state)
dump() method.state - - state of objectio.reactivex.rxjava3.core.Completable 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 unitio.reactivex.rxjava3.core.Completable restoreAndReplace(byte[] state)
state - - state of the objectio.reactivex.rxjava3.core.Completable restoreAndReplace(byte[] state,
long timeToLive,
TimeUnit timeUnit)
state - - state of the objecttimeToLive - - time to live of the objecttimeUnit - - time unitio.reactivex.rxjava3.core.Single<byte[]> dump()
io.reactivex.rxjava3.core.Single<Boolean> touch()
true if object was touched else falseio.reactivex.rxjava3.core.Single<Boolean> unlink()
Requires Redis 4.0+
true if it was exist and deleted else falseio.reactivex.rxjava3.core.Completable 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 millisecondsio.reactivex.rxjava3.core.Completable 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 millisecondsio.reactivex.rxjava3.core.Single<Boolean> move(int database)
database - - number of Redis databasetrue if key was moved false if notio.reactivex.rxjava3.core.Single<Boolean> delete()
true if object was deleted false if notio.reactivex.rxjava3.core.Completable rename(String newName)
newName
in modenewName - - new name of objectio.reactivex.rxjava3.core.Single<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 otherwiseio.reactivex.rxjava3.core.Single<Boolean> isExists()
true if object exists and false otherwiseio.reactivex.rxjava3.core.Single<Integer> addListener(ObjectListener listener)
listener - - object event listenerExpiredObjectListener,
DeletedObjectListenerio.reactivex.rxjava3.core.Completable removeListener(int listenerId)
listenerId - - listener idCopyright © 2014–2020 Redisson. All rights reserved.