public interface RObject extends RObjectAsync
| Modifier and Type | Method and Description |
|---|---|
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)
Transfer an 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.
|
deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsyncboolean touch()
true if object was touched else falsevoid migrate(String host, int port, int database)
host - - destination hostport - - destination portdatabase - - destination databaseboolean move(int database)
database - - Redis database numbertrue if key was moved else falseString getName()
boolean delete()
true if it was exist and deleted else falseboolean unlink()
Requires Redis 4.0+
true if it was exist and deleted else falsevoid rename(String newName)
newNamenewName - - 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–2017 The Redisson Project. All rights reserved.