Package org.redisson.api
Interface RObjectRx
-
- All Known Subinterfaces:
RAtomicDoubleRx
,RAtomicLongRx
,RBitSetRx
,RBlockingDequeRx<V>
,RBlockingQueueRx<V>
,RBucketRx<V>
,RCollectionRx<V>
,RDequeRx<V>
,RExpirableRx
,RGeoRx<V>
,RHyperLogLogRx<V>
,RLexSortedSetRx
,RListMultimapRx<K,V>
,RListRx<V>
,RLockRx
,RMapCacheRx<K,V>
,RMapRx<K,V>
,RMultimapRx<K,V>
,RPermitExpirableSemaphoreRx
,RQueueRx<V>
,RRateLimiterRx
,RScoredSortedSetRx<V>
,RSemaphoreRx
,RSetCacheRx<V>
,RSetMultimapRx<K,V>
,RSetRx<V>
,RStreamRx<K,V>
public interface RObjectRx
Base interface for all Redisson objects- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.Flowable<Void>
copy(String host, int port, int database, long timeout)
Copy object from source Redis instance to destination Redis instanceio.reactivex.Flowable<Boolean>
delete()
Delete object in modeio.reactivex.Flowable<byte[]>
dump()
Returns dump of objectCodec
getCodec()
String
getName()
io.reactivex.Flowable<Boolean>
isExists()
Check object existenceio.reactivex.Flowable<Void>
migrate(String host, int port, int database, long timeout)
Transfer a object from a source Redis instance to a destination Redis instance in modeio.reactivex.Flowable<Boolean>
move(int database)
Move object to another database in modeio.reactivex.Flowable<Void>
rename(String newName)
Rename current object key tonewName
in modeio.reactivex.Flowable<Boolean>
renamenx(String newName)
Rename current object key tonewName
in mode only if new key is not existsio.reactivex.Flowable<Void>
restore(byte[] state)
Restores object using its state returned bydump()
method.io.reactivex.Flowable<Void>
restore(byte[] state, long timeToLive, TimeUnit timeUnit)
Restores object using its state returned bydump()
method and set time to live for it.io.reactivex.Flowable<Void>
restoreAndReplace(byte[] state)
Restores and replaces object if it already exists.io.reactivex.Flowable<Void>
restoreAndReplace(byte[] state, long timeToLive, TimeUnit timeUnit)
Restores and replaces object if it already exists and set time to live for it.io.reactivex.Flowable<Boolean>
touch()
Update the last access time of an object.io.reactivex.Flowable<Boolean>
unlink()
Delete the objects.
-
-
-
Method Detail
-
getName
String getName()
-
getCodec
Codec getCodec()
-
restore
io.reactivex.Flowable<Void> restore(byte[] state)
Restores object using its state returned bydump()
method.- Parameters:
state
- - state of object- Returns:
- void
-
restore
io.reactivex.Flowable<Void> restore(byte[] state, long timeToLive, TimeUnit timeUnit)
Restores object using its state returned bydump()
method and set time to live for it.- Parameters:
state
- - state of objecttimeToLive
- - time to live of the objecttimeUnit
- - time unit- Returns:
- void
-
restoreAndReplace
io.reactivex.Flowable<Void> restoreAndReplace(byte[] state)
Restores and replaces object if it already exists.- Parameters:
state
- - state of the object- Returns:
- void
-
restoreAndReplace
io.reactivex.Flowable<Void> restoreAndReplace(byte[] state, long timeToLive, TimeUnit timeUnit)
Restores and replaces object if it already exists and set time to live for it.- Parameters:
state
- - state of the objecttimeToLive
- - time to live of the objecttimeUnit
- - time unit- Returns:
- void
-
dump
io.reactivex.Flowable<byte[]> dump()
Returns dump of object- Returns:
- dump
-
touch
io.reactivex.Flowable<Boolean> touch()
Update the last access time of an object.- Returns:
true
if object was touched elsefalse
-
unlink
io.reactivex.Flowable<Boolean> unlink()
Delete the objects. Actual removal will happen later asynchronously.Requires Redis 4.0+
- Returns:
true
if it was exist and deleted elsefalse
-
copy
io.reactivex.Flowable<Void> copy(String host, int port, int database, long timeout)
Copy object from source Redis instance to destination Redis instance- Parameters:
host
- - destination hostport
- - destination portdatabase
- - destination databasetimeout
- - maximum idle time in any moment of the communication with the destination instance in milliseconds- Returns:
- void
-
migrate
io.reactivex.Flowable<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- Parameters:
host
- - destination hostport
- - destination portdatabase
- - destination databasetimeout
- - maximum idle time in any moment of the communication with the destination instance in milliseconds- Returns:
- void
-
move
io.reactivex.Flowable<Boolean> move(int database)
Move object to another database in mode- Parameters:
database
- - number of Redis database- Returns:
true
if key was movedfalse
if not
-
delete
io.reactivex.Flowable<Boolean> delete()
Delete object in mode- Returns:
true
if object was deletedfalse
if not
-
rename
io.reactivex.Flowable<Void> rename(String newName)
Rename current object key tonewName
in mode- Parameters:
newName
- - new name of object- Returns:
- void
-
renamenx
io.reactivex.Flowable<Boolean> renamenx(String newName)
Rename current object key tonewName
in mode only if new key is not exists- Parameters:
newName
- - new name of object- Returns:
true
if object has been renamed successfully andfalse
otherwise
-
isExists
io.reactivex.Flowable<Boolean> isExists()
Check object existence- Returns:
true
if object exists andfalse
otherwise
-
-