Package org.redisson.api
Interface RLiveObject
-
public interface RLiveObject
- Author:
- Rui Gu (https://github.com/jackygurui)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
delete()
Deletes the underlying RMap.Object
getLiveObjectId()
Returns the value of the field that has the RId annotation.boolean
isExists()
Returns true if this object holds no other values apart from the field annotated with RId.void
setLiveObjectId(Object liveObjectId)
Change the value of the field that has the RId annotation.
-
-
-
Method Detail
-
getLiveObjectId
Object getLiveObjectId()
Returns the value of the field that has the RId annotation.- Returns:
- liveObjectId
-
setLiveObjectId
void setLiveObjectId(Object liveObjectId)
Change the value of the field that has the RId annotation. Since the liveObjectId is encoded as a part of the name of the underlying RMap, this action will result in renaming the underlying RMap based on the naming scheme specified in the REntity annotation of the instance class.- Parameters:
liveObjectId
- the liveObjectId to set- See Also:
RMap
-
isExists
boolean isExists()
Returns true if this object holds no other values apart from the field annotated with RId. This involves in invoking the isExist() method on the underlying RMap. Since the field with RId annotation is encoded in the name of the underlying RMap, so to ensure the map exist in redis, set a non null value to any of the other fields.- Returns:
true
is object exists- See Also:
RMap
-
delete
boolean delete()
Deletes the underlying RMap.- Returns:
true
if object deleted successfully
-
-