Package io.ebeaninternal.server.cache
Class CachedBeanData
- java.lang.Object
-
- io.ebeaninternal.server.cache.CachedBeanData
-
- All Implemented Interfaces:
Externalizable
,Serializable
public class CachedBeanData extends Object implements Externalizable
Data held in the bean cache for cached beans.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CachedBeanData()
Construct from serialisation.CachedBeanData(Object sharableBean, String discValue, Map<String,Object> data, long version)
Construct from a loaded bean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getData()
Return all the property data.Object
getData(String propertyName)
Return the value for a given property name.String
getDiscValue()
Return the raw discriminator value.Object
getSharableBean()
Return a sharable (immutable read only) bean.long
getVersion()
Return the version value.long
getWhenCreated()
Return when the cached data was created.boolean
isLoaded(String propertyName)
Return true if the property is held.void
readExternal(ObjectInput in)
String
toString()
CachedBeanData
update(Map<String,Object> changes, long version)
Create and return a new version of CachedBeanData based on this entry applying the given changes.void
writeExternal(ObjectOutput out)
-
-
-
Constructor Detail
-
CachedBeanData
public CachedBeanData(Object sharableBean, String discValue, Map<String,Object> data, long version)
Construct from a loaded bean.
-
CachedBeanData
public CachedBeanData()
Construct from serialisation.
-
-
Method Detail
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
update
public CachedBeanData update(Map<String,Object> changes, long version)
Create and return a new version of CachedBeanData based on this entry applying the given changes.
-
getWhenCreated
public long getWhenCreated()
Return when the cached data was created.
-
getVersion
public long getVersion()
Return the version value.
-
getDiscValue
public String getDiscValue()
Return the raw discriminator value.
-
getSharableBean
public Object getSharableBean()
Return a sharable (immutable read only) bean. Near cache only use.
-
-