RObjectAsync
RAtomicDouble
, RAtomicLong
, RBinaryStream
, RBitSet
, RBlockingDeque<V>
, RBlockingQueue<V>
, RBloomFilter<T>
, RBoundedBlockingQueue<V>
, RBucket<V>
, RCountDownLatch
, RDelayedQueue<V>
, RDeque<V>
, RDoubleAdder
, RExpirable
, RGeo<V>
, RHyperLogLog<V>
, RLexSortedSet
, RList<V>
, RListMultimap<K,V>
, RListMultimapCache<K,V>
, RLocalCachedMap<K,V>
, RLock
, RLongAdder
, RMap<K,V>
, RMapCache<K,V>
, RMultimap<K,V>
, RMultimapCache<K,V>
, RPermitExpirableSemaphore
, RPriorityBlockingDeque<V>
, RPriorityBlockingQueue<V>
, RPriorityDeque<V>
, RPriorityQueue<V>
, RQueue<V>
, RRateLimiter
, RReadWriteLock
, RScoredSortedSet<V>
, RSemaphore
, RSet<V>
, RSetCache<V>
, RSetMultimap<K,V>
, RSetMultimapCache<K,V>
, RSortedSet<V>
, RStream<K,V>
JCache
, RedissonAtomicDouble
, RedissonAtomicLong
, RedissonBaseAdder
, RedissonBinaryStream
, RedissonBitSet
, RedissonBlockingDeque
, RedissonBlockingQueue
, RedissonBloomFilter
, RedissonBoundedBlockingQueue
, RedissonBucket
, RedissonCountDownLatch
, RedissonDelayedQueue
, RedissonDeque
, RedissonDoubleAdder
, RedissonFairLock
, RedissonGeo
, RedissonHyperLogLog
, RedissonLexSortedSet
, RedissonList
, RedissonListMultimap
, RedissonListMultimapCache
, RedissonListMultimapValues
, RedissonLocalCachedMap
, RedissonLock
, RedissonLongAdder
, RedissonMap
, RedissonMapCache
, RedissonMultimap
, RedissonObject
, RedissonPermitExpirableSemaphore
, RedissonPriorityBlockingDeque
, RedissonPriorityBlockingQueue
, RedissonPriorityDeque
, RedissonPriorityQueue
, RedissonQueue
, RedissonQueueSemaphore
, RedissonRateLimiter
, RedissonReadLock
, RedissonReadWriteLock
, RedissonScoredSortedSet
, RedissonSemaphore
, RedissonSet
, RedissonSetCache
, RedissonSetMultimap
, RedissonSetMultimapCache
, RedissonSetMultimapValues
, RedissonSortedSet
, RedissonStream
, RedissonSubList
, RedissonTransactionalBucket
, RedissonTransactionalLocalCachedMap
, RedissonTransactionalLock
, RedissonTransactionalMap
, RedissonTransactionalMapCache
, RedissonTransactionalSet
, RedissonTransactionalSetCache
, RedissonWriteLock
public interface RObject extends RObjectAsync
Modifier and Type | Method | Description |
---|---|---|
void |
copy(String host,
int port,
int database,
long timeout) |
Copy object from source Redis instance to destination Redis instance
|
boolean |
delete() |
Deletes the object
|
byte[] |
dump() |
Returns dump of object
|
Codec |
getCodec() |
Returns the underlying Codec used by this RObject
|
String |
getName() |
Returns name of object
|
boolean |
isExists() |
Check object existence
|
void |
migrate(String host,
int port,
int database,
long timeout) |
Copy object from source Redis instance to destination Redis instance
|
boolean |
move(int database) |
Move object to another database
|
void |
rename(String newName) |
Rename current object key to
newName |
boolean |
renamenx(String newName) |
Rename current object key to
newName
only if new key is not exists |
void |
restore(byte[] state) |
Restores object using its state returned by
dump() method. |
void |
restore(byte[] state,
long timeToLive,
TimeUnit timeUnit) |
Restores object using its state returned by
dump() method and set time to live for it. |
void |
restoreAndReplace(byte[] state) |
Restores and replaces object if it already exists.
|
void |
restoreAndReplace(byte[] state,
long timeToLive,
TimeUnit timeUnit) |
Restores and replaces object if it already exists and set time to live for it.
|
boolean |
touch() |
Update the last access time of an object.
|
boolean |
unlink() |
Delete the objects.
|
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
void restore(byte[] state)
dump()
method.state
- - state of objectvoid 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 unitvoid restoreAndReplace(byte[] state)
state
- - state of the objectvoid restoreAndReplace(byte[] state, long timeToLive, TimeUnit timeUnit)
state
- - state of the objecttimeToLive
- - time to live of the objecttimeUnit
- - time unitbyte[] dump()
boolean touch()
true
if object was touched else false
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 millisecondsvoid 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 millisecondsboolean move(int database)
database
- - Redis database numbertrue
if key was moved else false
String getName()
boolean delete()
true
if it was exist and deleted else false
boolean unlink()
Requires Redis 4.0+
true
if it was exist and deleted else false
void rename(String newName)
newName
newName
- - new name of objectboolean renamenx(String newName)
newName
only if new key is not existsnewName
- - new name of objecttrue
if object has been renamed successfully and false
otherwiseboolean isExists()
true
if object exists and false
otherwiseCodec getCodec()
Copyright © 2014–2018 The Redisson Project. All rights reserved.