Interface TStore<T>

  • All Superinterfaces:
    All Known Implementing Classes:
    AgeOffStore, ZooStore

    public interface TStore<T>
    extends ReadOnlyTStore<T>
    Transaction Store: a place to save transactions A transaction consists of a number of operations. To use, first create a transaction id, and then seed the transaction with an initial operation. An executor service can then execute the transaction's operation, possibly pushing more operations onto the transaction as each step successfully completes. If a step fails, the stack can be unwound, undoing each operation.
    • Method Detail

      • create

        long create()
        Create a new transaction id
        a transaction id
      • top

        Repo<T> top​(long tid)
        Description copied from interface: ReadOnlyTStore
        Get the current operation for the given transaction id. Caller must have already reserved tid.
        Specified by:
        top in interface ReadOnlyTStore<T>
        tid - transaction id, previously reserved.
        a read-only view of the operation
      • pop

        void pop​(long tid)
        Remove the last pushed operation from the given transaction.
      • setStatus

        void setStatus​(long tid,
                       ReadOnlyTStore.TStatus status)
        Update the state of a given transaction
        tid - transaction id
        status - execution status
      • delete

        void delete​(long tid)
        Remove the transaction from the store.
        tid - the transaction id