Class JournalTransactionalResourceServicePersistenceEnvironment
java.lang.Object
dev.getelements.elements.rt.transact.JournalTransactionalResourceServicePersistenceEnvironment
- All Implemented Interfaces:
PersistenceEnvironment,TransactionalResourceServicePersistence
public class JournalTransactionalResourceServicePersistenceEnvironment
extends Object
implements PersistenceEnvironment, TransactionalResourceServicePersistence
-
Constructor Summary
ConstructorsConstructorDescriptionJournalTransactionalResourceServicePersistenceEnvironment(jakarta.inject.Provider<Snapshot.Builder> snapshotBuilderProvider, DataStore dataStore, TransactionJournal transactionJournal, JournalTransactionalPersistenceDriver journalTransactionalPersistenceDriver) -
Method Summary
Modifier and TypeMethodDescriptionStarts building an instance ofReadOnlyTransactionagainst the underlying data store.Starts building an instance ofReadWriteTransactionagainst the underlying data store.jakarta.inject.Provider<Snapshot.Builder> Opens aExclusiveReadWriteTransactionwhich will lock the entire underlying data storage such that certain operations may be performed against the whole dataset.voidstart()Starts thePersistenceEnvironmentinstance and obtains all resources necessary to begin accessing the underlying data store.voidstop()Closes thisPersistenceEnvironmentinstance and releases any underlying connections to the data storage.
-
Constructor Details
-
JournalTransactionalResourceServicePersistenceEnvironment
@Inject public JournalTransactionalResourceServicePersistenceEnvironment(jakarta.inject.Provider<Snapshot.Builder> snapshotBuilderProvider, DataStore dataStore, TransactionJournal transactionJournal, JournalTransactionalPersistenceDriver journalTransactionalPersistenceDriver)
-
-
Method Details
-
start
public void start()Description copied from interface:PersistenceEnvironmentStarts thePersistenceEnvironmentinstance and obtains all resources necessary to begin accessing the underlying data store.- Specified by:
startin interfacePersistenceEnvironment
-
stop
public void stop()Description copied from interface:PersistenceEnvironmentCloses thisPersistenceEnvironmentinstance and releases any underlying connections to the data storage. Outstanding transactions may be forcibly closed if this is called.- Specified by:
stopin interfacePersistenceEnvironment
-
buildRO
Description copied from interface:TransactionalResourceServicePersistenceStarts building an instance ofReadOnlyTransactionagainst the underlying data store.- Specified by:
buildROin interfaceTransactionalResourceServicePersistence- Parameters:
nodeId- theNodeIdto use for the transaction context.- Returns:
- the
ReadOnlyTransaction
-
buildRW
Description copied from interface:TransactionalResourceServicePersistenceStarts building an instance ofReadWriteTransactionagainst the underlying data store.- Specified by:
buildRWin interfaceTransactionalResourceServicePersistence- Parameters:
nodeId- theNodeIdto use for the transaction context.- Returns:
- the
ReadOnlyTransaction
-
openExclusiveRW
Description copied from interface:TransactionalResourceServicePersistenceOpens aExclusiveReadWriteTransactionwhich will lock the entire underlying data storage such that certain operations may be performed against the whole dataset. Generally this should be avoided as it incurs a steep performance penalty.- Specified by:
openExclusiveRWin interfaceTransactionalResourceServicePersistence- Returns:
- the
ExclusiveReadWriteTransaction
-
getSnapshotBuilderProvider
-
getDataStore
-
getTransactionJournal
-
getJournalTransactionalPersistenceDriver
-