public interface RObject extends RObjectAsync
Modifier and Type | Method and 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
|
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 |
boolean |
touch()
Update the last access time of an object.
|
boolean |
unlink()
Delete the objects.
|
copyAsync, deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsync
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.