public interface IStoreObjectMetadata
Modifier and Type | Method and Description |
---|---|
com.eaio.uuid.UUID |
ensureId()
Instructs the object to generate a UUID if not already
generated.
|
IStoreBinding |
getBinding()
Get the store binding associated with an object.
|
long |
getCheckpointVersion()
Get an object's checkpoint version.
|
int |
getCommittedDataSize()
Called by an
IStoreBinding during commit to determine the previously
committed data size. |
com.eaio.uuid.UUID |
getId()
Get an object's id.
|
short |
getOfid()
Get an object's factory id
|
long |
getStableTransactionId()
Gets the transactionId considered stabilized by the application.
|
long |
getTransactionId()
Get the application transaction id.
|
short |
getType()
Get the object type.
|
IStoreObject |
setBinding(IStoreBinding binding)
Set the store binding associated with an object.
|
void |
setCheckpointVersion(long version)
Update checkpoint version of an object
|
void |
setCommittedDataSize(int dataSize)
Called by an
IStoreBinding during commit to track an object's data size. |
void |
setId(com.eaio.uuid.UUID id)
Set an object'd id.
|
IStoreObject |
setStableTransactionId(long id)
Set the the transactionId considered stabilized by the application.
|
IStoreObject |
setTransactionId(long id)
Set the application transaction id.
|
void setId(com.eaio.uuid.UUID id)
Note: This method may copy the uuid into a preallocated uuid
instance in the interest of reducing garbage collection, so the caller
should not rely on the instance subsequently returned from getId()
to be the same instance, just an equivalent one.
IllegalStateException
- If the node already has an id set.com.eaio.uuid.UUID ensureId()
getId()
must
return a non null value;
NOTE:
If the IStoreObject
is pooled, the validity of the returned UUID
is only
valid while the object remains undisposed (see IStoreObject.dispose()
. Once the object
is returned to its pool the UUID
may be wiped and reused. Consequently,
callers that plan to use the returned id beyond this objects lifespan should either
make a copy of it, or acquire this object to prevent it from be returned to its pool.
com.eaio.uuid.UUID getId()
NOTE:
If this object is pooled, the validity of the returned UUID
is only
valid while the object remains, undisposed. Once the object is returned to
its pool the UUID may be wiped and reused. Consequently, callers that plan
to use the returned id beyond this objects lifespan should either make a
copy of it, or aquire this object to prevent it from be returned to its pool.
Each ODS store object is universally identified by a UUID. This method returns an object's id.
short getOfid()
This method returns the id of the factory used to instantiate the object.
short getType()
An object type uniquely identifies the object within its factory.
IStoreObject setBinding(IStoreBinding binding)
An object can be stored by one and only one store binding at any point in time. This method sets the binding associated with an object. The binding invokes this method when an object is put and removed from the store.
IStoreBinding getBinding()
IStoreObject setTransactionId(long id)
id
- The transaction id to setlong getTransactionId()
IStoreObject setStableTransactionId(long id)
id
- The stable transaction id to setlong getStableTransactionId()
void setCheckpointVersion(long version)
version
- The new checkpoint version.
Note: May only be called by an
{@link IStoreBinding} to update the checkpoint version
of the object.
long getCheckpointVersion()
When an IStoreObject
is added to a store or mutated its
checkpoint modification counter is set to its IStoreBinding
's
next checkpoint number. This field can be used to perform 'change data
capture' or CDC on stores that are checkpointed to see if a node has
changed since a given store checkpoint.
When an object is removed for a store the store must set the checkpoint version of the object back to -1.
void setCommittedDataSize(int dataSize)
IStoreBinding
during commit to track an object's data size.
Implementors must store this value and return it unaltered to the store
via getCommittedDataSize()
dataSize
- The committed data size.int getCommittedDataSize()
IStoreBinding
during commit to determine the previously
committed data size.
This
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.