Interface TxnMgr

All Known Implementing Classes:
TxnMgrImpl

public interface TxnMgr
  • Method Details

    • getTxnMgrId

      String getTxnMgrId()
    • getLockStore

      LockStore<String[],String> getLockStore()
    • getResRepo

      ResourceRepository<String> getResRepo()
    • getRootPath

      Path getRootPath()
    • newTxn

      Txn newTxn(String id, boolean useJournal, boolean isWrite) throws IOException
      Create a new transaction. If the id is null then an id will be allocated. If a txn with the given id already exists an exception in raised.
      Throws:
      IOException
    • newTxn

      default Txn newTxn(boolean useJournal, boolean isWrite) throws IOException
      Throws:
      IOException
    • getTxn

      Txn getTxn(String txnId)
      Get an accessor to an existing transaction
    • streamTxns

      Stream<Txn> streamTxns() throws IOException
      Stream all existing transactions
      Throws:
      IOException
    • deleteResources

      void deleteResources() throws IOException
      Method mainly (or rather only) for testing: Clears all locks and transactions regardless of any concurrent access. Resets the txn manager's state to a clean slate.
      Throws:
      IOException
    • getHeartbeatDuration

      TemporalAmount getHeartbeatDuration()
      The time interval between two heartbeats for when transaction metadata in the backend (e.g. a file in the filesystem) is updated to indicate that a transaction's process is still running. Conversely, exceeding the heartbeat duration (with a little margin) indicates that the process managing a transaction must have stopped or is terminated and the transaction can be rolled back.