Package org.redisson.api
Interface RObjectReactive
-
- All Known Subinterfaces:
RAtomicDoubleReactive
,RAtomicLongReactive
,RBitSetReactive
,RBlockingDequeReactive<V>
,RBlockingQueueReactive<V>
,RBucketReactive<V>
,RCollectionReactive<V>
,RDequeReactive<V>
,RExpirableReactive
,RGeoReactive<V>
,RHyperLogLogReactive<V>
,RLexSortedSetReactive
,RListMultimapReactive<K,V>
,RListReactive<V>
,RLockReactive
,RMapCacheReactive<K,V>
,RMapReactive<K,V>
,RMultimapReactive<K,V>
,RPermitExpirableSemaphoreReactive
,RQueueReactive<V>
,RRateLimiterReactive
,RScoredSortedSetReactive<V>
,RSemaphoreReactive
,RSetCacheReactive<V>
,RSetMultimapReactive<K,V>
,RSetReactive<V>
,RStreamReactive<K,V>
public interface RObjectReactive
Base interface for all Redisson objects- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.reactivestreams.Publisher<Void>
copy(String host, int port, int database, long timeout)
Copy object from source Redis instance to destination Redis instanceorg.reactivestreams.Publisher<Boolean>
delete()
Delete object in modeorg.reactivestreams.Publisher<byte[]>
dump()
Returns dump of objectCodec
getCodec()
String
getName()
org.reactivestreams.Publisher<Boolean>
isExists()
Check object existenceorg.reactivestreams.Publisher<Void>
migrate(String host, int port, int database, long timeout)
Transfer a object from a source Redis instance to a destination Redis instance in modeorg.reactivestreams.Publisher<Boolean>
move(int database)
Move object to another database in modeorg.reactivestreams.Publisher<Void>
rename(String newName)
Rename current object key tonewName
in modeorg.reactivestreams.Publisher<Boolean>
renamenx(String newName)
Rename current object key tonewName
in mode only if new key is not existsorg.reactivestreams.Publisher<Void>
restore(byte[] state)
Restores object using its state returned bydump()
method.org.reactivestreams.Publisher<Void>
restore(byte[] state, long timeToLive, TimeUnit timeUnit)
Restores object using its state returned bydump()
method and set time to live for it.org.reactivestreams.Publisher<Void>
restoreAndReplace(byte[] state)
Restores and replaces object if it already exists.org.reactivestreams.Publisher<Void>
restoreAndReplace(byte[] state, long timeToLive, TimeUnit timeUnit)
Restores and replaces object if it already exists and set time to live for it.org.reactivestreams.Publisher<Boolean>
touch()
Update the last access time of an object.org.reactivestreams.Publisher<Boolean>
unlink()
Delete the objects.
-
-
-
Method Detail
-
getName
String getName()
-
getCodec
Codec getCodec()
-
restore
org.reactivestreams.Publisher<Void> restore(byte[] state)
Restores object using its state returned bydump()
method.- Parameters:
state
- - state of object- Returns:
- void
-
restore
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<Void> restoreAndReplace(byte[] state)
Restores and replaces object if it already exists.- Parameters:
state
- - state of the object- Returns:
- void
-
restoreAndReplace
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<byte[]> dump()
Returns dump of object- Returns:
- dump
-
touch
org.reactivestreams.Publisher<Boolean> touch()
Update the last access time of an object.- Returns:
true
if object was touched elsefalse
-
unlink
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<Boolean> delete()
Delete object in mode- Returns:
true
if object was deletedfalse
if not
-
rename
org.reactivestreams.Publisher<Void> rename(String newName)
Rename current object key tonewName
in mode- Parameters:
newName
- - new name of object- Returns:
- void
-
renamenx
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<Boolean> isExists()
Check object existence- Returns:
true
if object exists andfalse
otherwise
-
-