Interface TxnMgr
- All Known Implementing Classes:
TxnMgrImpl
public interface TxnMgr
-
Method Summary
Modifier and TypeMethodDescriptionvoidMethod mainly (or rather only) for testing: Clears all locks and transactions regardless of any concurrent access.The time interval between two heartbeats for when transaction metadata in the backend (e.g.Get an accessor to an existing transactiondefault TxnnewTxn(boolean useJournal, boolean isWrite) Create a new transaction.Stream all existing transactions
-
Method Details
-
getTxnMgrId
String getTxnMgrId() -
getLockStore
-
getResRepo
ResourceRepository<String> getResRepo() -
getRootPath
Path getRootPath() -
newTxn
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
- Throws:
IOException
-
getTxn
-
streamTxns
-
deleteResources
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.
-