Package org.redisson.api
Interface RObjectRx
- All Known Subinterfaces:
RAtomicDoubleRx
,RAtomicLongRx
,RBinaryStreamRx
,RBitSetRx
,RBlockingDequeRx<V>
,RBlockingQueueRx<V>
,RBloomFilterRx<T>
,RBucketRx<V>
,RCollectionRx<V>
,RCountDownLatchReactive
,RCountDownLatchRx
,RDequeRx<V>
,RExpirableRx
,RGeoRx<V>
,RHyperLogLogRx<V>
,RIdGeneratorRx
,RJsonBucketRx<V>
,RJsonStoreRx<K,
,V> RLexSortedSetRx
,RListMultimapCacheNativeRx<K,
,V> RListMultimapCacheRx<K,
,V> RListMultimapRx<K,
,V> RListRx<V>
,RLocalCachedMapCacheRx<K,
,V> RLocalCachedMapRx<K,
,V> RMapCacheNativeRx<K,
,V> RMapCacheRx<K,
,V> RMapRx<K,
,V> RMultimapRx<K,
,V> RPermitExpirableSemaphoreRx
,RQueueRx<V>
,RRateLimiterRx
,RReliableTopicRx
,RRingBufferRx<V>
,RScoredSortedSetRx<V>
,RSemaphoreRx
,RSetCacheRx<V>
,RSetMultimapCacheNativeRx<K,
,V> RSetMultimapCacheRx<K,
,V> RSetMultimapRx<K,
,V> RSetRx<V>
,RStreamRx<K,
,V> RTimeSeriesRx<V,
,L> RTransferQueueRx<V>
public interface RObjectRx
Base RxJava2 interface for all Redisson objects
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single
<Integer> addListener
(ObjectListener listener) Adds object event listenerio.reactivex.rxjava3.core.Single
<Boolean> Copy this object instance to the new instance with a defined name.io.reactivex.rxjava3.core.Single
<Boolean> Copy this object instance to the new instance with a defined name and database.io.reactivex.rxjava3.core.Completable
Copy object from source Redis instance to destination Redis instanceio.reactivex.rxjava3.core.Single
<Boolean> copyAndReplace
(String destination) Copy this object instance to the new instance with a defined name, and replace it if it already exists.io.reactivex.rxjava3.core.Single
<Boolean> copyAndReplace
(String destination, int database) Copy this object instance to the new instance with a defined name and database, and replace it if it already exists.io.reactivex.rxjava3.core.Single
<Boolean> delete()
Delete object in modeio.reactivex.rxjava3.core.Single
<byte[]> dump()
Returns dump of objectgetCodec()
io.reactivex.rxjava3.core.Single
<Long> Returns number of seconds spent since last write or read operation over this object.getName()
io.reactivex.rxjava3.core.Single
<Boolean> isExists()
Check object existenceio.reactivex.rxjava3.core.Completable
Transfer a object from a source Redis instance to a destination Redis instance in modeio.reactivex.rxjava3.core.Single
<Boolean> move
(int database) Move object to another database in modeio.reactivex.rxjava3.core.Completable
removeListener
(int listenerId) Removes object event listenerio.reactivex.rxjava3.core.Completable
Rename current object key tonewName
in modeio.reactivex.rxjava3.core.Single
<Boolean> Rename current object key tonewName
in mode only if new key is not existsio.reactivex.rxjava3.core.Completable
restore
(byte[] state) Restores object using its state returned bydump()
method.io.reactivex.rxjava3.core.Completable
Restores object using its state returned bydump()
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> 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.
-
Method Details
-
getIdleTime
io.reactivex.rxjava3.core.Single<Long> getIdleTime()Returns number of seconds spent since last write or read operation over this object.- Returns:
- number of seconds
-
getName
String getName() -
getCodec
Codec getCodec() -
sizeInMemory
io.reactivex.rxjava3.core.Single<Long> sizeInMemory()Returns bytes amount used by object in Redis memory.- Returns:
- size in bytes
-
restore
io.reactivex.rxjava3.core.Completable restore(byte[] state) Restores object using its state returned bydump()
method.- Parameters:
state
- - state of object- Returns:
- void
-
restore
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.rxjava3.core.Completable restoreAndReplace(byte[] state) Restores and replaces object if it already exists.- Parameters:
state
- - state of the object- Returns:
- void
-
restoreAndReplace
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.- Parameters:
state
- - state of the objecttimeToLive
- - time to live of the objecttimeUnit
- - time unit- Returns:
- void
-
dump
io.reactivex.rxjava3.core.Single<byte[]> dump()Returns dump of object- Returns:
- dump
-
touch
io.reactivex.rxjava3.core.Single<Boolean> touch()Update the last access time of an object.- Returns:
true
if object was touched elsefalse
-
unlink
io.reactivex.rxjava3.core.Single<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
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
-
copy
Copy this object instance to the new instance with a defined name.- Parameters:
destination
- name of the destination instance- Returns:
true
if this object instance was copied elsefalse
-
copy
Copy this object instance to the new instance with a defined name and database.- Parameters:
destination
- name of the destination instancedatabase
- database number- Returns:
true
if this object instance was copied elsefalse
-
copyAndReplace
Copy this object instance to the new instance with a defined name, and replace it if it already exists.- Parameters:
destination
- name of the destination instance- Returns:
true
if this object instance was copied elsefalse
-
copyAndReplace
Copy this object instance to the new instance with a defined name and database, and replace it if it already exists.- Parameters:
destination
- name of the destination instancedatabase
- database number- Returns:
true
if this object instance was copied elsefalse
-
migrate
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
Move object to another database in mode- Parameters:
database
- - number of Redis database- Returns:
true
if key was movedfalse
if not
-
delete
io.reactivex.rxjava3.core.Single<Boolean> delete()Delete object in mode- Returns:
true
if object was deletedfalse
if not
-
rename
Rename current object key tonewName
in mode- Parameters:
newName
- - new name of object- Returns:
- void
-
renamenx
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.rxjava3.core.Single<Boolean> isExists()Check object existence- Returns:
true
if object exists andfalse
otherwise
-
addListener
Adds object event listener- Parameters:
listener
- - object event listener- Returns:
- listener id
- See Also:
-
removeListener
io.reactivex.rxjava3.core.Completable removeListener(int listenerId) Removes object event listener- Parameters:
listenerId
- - listener id
-