Package com.db4o.internal
Class LazyObjectReference
- java.lang.Object
-
- com.db4o.internal.LazyObjectReference
-
- All Implemented Interfaces:
ObjectInfo
public class LazyObjectReference extends java.lang.Object implements ObjectInfo
-
-
Constructor Summary
Constructors Constructor Description LazyObjectReference(Transaction transaction, int id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getCommitTimestamp()
The serial timestamp the object is assigned to when it is committed.
You need to enable this feature before using it inFileConfiguration.generateCommitTimestamps(boolean)
.
All the objects commited within the same transaction will receive the same commitTimestamp.
db4o replication system (dRS) relies on this feature.long
getInternalID()
returns the internal db4o ID.java.lang.Object
getObject()
returns the object that is referenced.Db4oUUID
getUUID()
returns a UUID representation of the referenced object.long
getVersion()
returns the transaction serial number ("version") the referenced object was stored with last.ObjectReference
reference()
-
-
-
Constructor Detail
-
LazyObjectReference
public LazyObjectReference(Transaction transaction, int id)
-
-
Method Detail
-
getInternalID
public long getInternalID()
Description copied from interface:ObjectInfo
returns the internal db4o ID.- Specified by:
getInternalID
in interfaceObjectInfo
-
getObject
public java.lang.Object getObject()
Description copied from interface:ObjectInfo
returns the object that is referenced.
This method may return null, if the object has been garbage collected.- Specified by:
getObject
in interfaceObjectInfo
- Returns:
- the referenced object or null, if the object has been garbage collected.
-
getUUID
public Db4oUUID getUUID()
Description copied from interface:ObjectInfo
returns a UUID representation of the referenced object. UUID generation has to be turned on, in order to be able to use this feature:FileConfiguration.generateUUIDs(com.db4o.config.ConfigScope)
- Specified by:
getUUID
in interfaceObjectInfo
- Returns:
- the UUID of the referenced object.
-
getVersion
public long getVersion()
Description copied from interface:ObjectInfo
returns the transaction serial number ("version") the referenced object was stored with last. Version number generation has to be turned on, in order to be able to use this feature:FileConfiguration.generateVersionNumbers(com.db4o.config.ConfigScope)
This feature was replaced byObjectInfo.getCommitTimestamp()
. The main difference is that the old version mechanism used to assign a serial timestamp to the object upon storing time, and the new commitTimestamp approach, assigns it upon commit time.- Specified by:
getVersion
in interfaceObjectInfo
- Returns:
- the version number.
-
getCommitTimestamp
public long getCommitTimestamp()
Description copied from interface:ObjectInfo
The serial timestamp the object is assigned to when it is committed.
You need to enable this feature before using it inFileConfiguration.generateCommitTimestamps(boolean)
.
All the objects commited within the same transaction will receive the same commitTimestamp.
db4o replication system (dRS) relies on this feature.- Specified by:
getCommitTimestamp
in interfaceObjectInfo
- Returns:
- the serial timestamp that was given to the object upon commit.
- See Also:
FileConfiguration.generateCommitTimestamps(boolean)
-
reference
public ObjectReference reference()
-
-