public interface IStoreObject extends UtlReferenceTracker.HasReferenceTracker, IStoreObjectMetadata
This interface defines the behavior of objects stored in ODSstores. An object can be stored in an ODS store if and only if it implements this interface.
Modifier and Type | Interface and Description |
---|---|
static class |
IStoreObject.EncodingType
Defines the various supported encoding types.
|
Modifier and Type | Method and Description |
---|---|
void |
acquire()
Increase a store object's ownership count.
|
IStoreObject |
deserialize(PktPacket serializedObject)
Deserialize an object's data.
|
IStoreObject |
deserializeMetadata(PktBuffer metadata)
Deserialize an object's metadata from its serialized form.
|
IStoreObject |
deserializeMetadata(PktBuffer metadata,
boolean copyDeserialize)
Deserialize an object's metadata from its serialized form.
|
int |
dispose()
Dispose a store object.
|
IStoreObject.EncodingType |
getContentEncodingType()
Get an object's content data encoding type.
|
boolean |
getIsReadOnly()
Get whether a object is read only
|
int |
getOwnershipCount()
Get a store object's ownership count.
|
int |
getSerializedMetadataLength()
Get the length of an object's serialized metadata length
|
IStoreObjectMetadata |
getStoreMetadata()
Gets the store metadata associated with this object.
|
PktPacket |
serialize()
Serialize an object's data.
|
int |
serializeMetadata(com.neeve.io.IOElasticBuffer buffer,
int offset)
Serialize an object's metadata.
|
IStoreObject |
setFieldValue(long fieldId,
Object fieldVal)
Set the value of an object field.
|
referenceTracker
ensureId, getBinding, getCheckpointVersion, getCommittedDataSize, getId, getOfid, getStableTransactionId, getTransactionId, getType, setBinding, setCheckpointVersion, setCommittedDataSize, setId, setStableTransactionId, setTransactionId
IStoreObjectMetadata getStoreMetadata()
boolean getIsReadOnly()
IStoreObject setFieldValue(long fieldId, Object fieldVal)
fieldId
- The field idfieldVal
- The field valueThis method is invoked during the rollback process to restore field values.
IStoreObject.EncodingType getContentEncodingType()
int getSerializedMetadataLength()
int serializeMetadata(com.neeve.io.IOElasticBuffer buffer, int offset)
buffer
- The buffer to serialize the metadata tooffset
- The offset within the buffer to serialize the metadata to.This method is invoked during the commit process to serialize an object's metadata.
PktPacket serialize()
This method is invoked during the commit process to serialize an object for replication and/or persistence and/or ICR send.
IStoreObject deserializeMetadata(PktBuffer metadata)
metadata
- The metadata in serialized form.IStoreObject deserializeMetadata(PktBuffer metadata, boolean copyDeserialize)
metadata
- The metadata in serialized form.copyDeserialize
- Whether the deserialization process should
copy fields out of the serialized form into private members. A
value of false could result in the metadata object holding onto
the IOBuffer underlying the supplied metadata beyond the scope
of this call.IStoreObject deserialize(PktPacket serializedObject)
serializedObject
- The object in serialized form.void acquire()
An object's ownership count starts at 1.
int getOwnershipCount()
int dispose()
This method should be invoked by the user when done with a store object. This allows the object implementation to track the lifetime of an object allow it to potentially implement faclities (such as object pooling) to improve performance. It is guaranteed however that not invoking this method will still cause the system to run correctly and in a stable fashion. However, in such a case, the performance may not be optimal.
Once disposed, all references to the disposed object should be discarded.
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.