com.neeve.ods
Interface IStoreTransactionLog


public interface IStoreTransactionLog

Represents an ODS store's transaction log.

Each ODS store binding can have at most a single active transaction at any point in time (shared and serialized across all threads operating on the store). The binding maintains a transaction log holding the uncommitted transaction operations. This interface exposes transaction log services accessible to the user. The primary service is the ability to record field level operations performed on store objects.

Threading:
A store transaction log is not safe for concurrent access by multiple threads on itself and the mutative binding methods.

Method Summary
 boolean hasUncommitted()
          Get if there are uncommitted entries in the log
<T> void
recordFieldUpdate(IStoreObject object, int fieldId, IStoreField<T> field, T fieldVal)
          Record a field update in a transaction log.
 

Method Detail

recordFieldUpdate

<T> void recordFieldUpdate(IStoreObject object,
                           int fieldId,
                           IStoreField<T> field,
                           T fieldVal)
Record a field update in a transaction log.

Parameters:
object - The object whose field update is to be recorded.
fieldId - The field's unique identifier. ODS requires all store objects to uniquely identify their fields using integer identifiers.
field - The field that can be used to access the field value. If the field is not supplied it will not be indexed if the store supports indexing.
fieldVal - The field's old value.
Threading:
This method is not safe for concurrent access by multiple threads with itself, other transaction log methods and mutative binding methods.

hasUncommitted

boolean hasUncommitted()
Get if there are uncommitted entries in the log

Threading:
This method is not safe for concurrent access by multiple threads with itself, other transaction log methods and mutative binding methods.

This method returns if there are any uncommitted entries in the transaction log. A transaction log has uncommitted entries if and only if one or more store operations covered by the transaction log (object put, object remove and and object field update) were performed since the last commit.



Copyright © 2016 Neeve Research, LLC. All Rights Reserved.