IPersistenceProvider Interface |
Namespace: de.unika.ipd.grGen.libGr
public interface IPersistenceProvider : IPersistenceProviderStatistics, IPersistenceProviderTransactionManager
The IPersistenceProvider type exposes the following members.
| Name | Description | |
|---|---|---|
| IsActive |
Tells whether a/the transaction is active.
(Inherited from IPersistenceProviderTransactionManager.) | |
| NumEdgesInDatabase |
Returns the number of edges in all graphs known to the database.
(Inherited from IPersistenceProviderStatistics.) | |
| NumGraphsInDatabase |
Returns the number of graphs known to the database.
(Inherited from IPersistenceProviderStatistics.) | |
| NumNodesInDatabase |
Returns the number of nodes in all graphs known to the database.
(Inherited from IPersistenceProviderStatistics.) | |
| NumObjectsInDatabase |
Returns the number of (internal class) objects known to the database.
(Inherited from IPersistenceProviderStatistics.) |
| Name | Description | |
|---|---|---|
| Close |
closes the repository / disconnects from the respository
| |
| Commit |
Commits the transaction, afterwards the changes up to that point are persistently stored for sure (all writes to the database up till that point are only temporary/pending), and a/the transaction is not active anymore.
(Inherited from IPersistenceProviderTransactionManager.) | |
| CommitAndRestart |
Intermediate commit, afterwards the changes up to that point are persistently stored for sure (all writes to the database up till that point are only temporary/pending), and a/the transaction is active.
(Inherited from IPersistenceProviderTransactionManager.) | |
| Open |
opens the repository / connects to the repository
the persistence provider can receive parameters with the connectionParameters string (typically for the underlying database)
and optional additional parameters with the persistentGraphParameters string
errors are reported by exception
| |
| ReadPersistentGraphAndRegisterToListenToGraphModifications |
fills the given host graph from the content stored in the repository, or creates the repository if it does not exist yet
the named graph must be empty (but its model must be known) (the graph is going to be the host graph/top-level graph of a system of graphs referenced from it)
the persistence provider registers as listener at the graph (just filled by reading from the repository)
it listens to change events and persists the ongoing modification of the graph to the repository
errors are reported by exception (todo: introduce dedicated exception classes)
| |
| RegisterToListenToProcessingEnvironmentEvents |
registers as listener of switch to subgraph and return from subgraph events at the graph processing environment
needed when subgraphs are to be processed (todo: also a performance and durability enhancement due to persistence transaction handling)
| |
| Rollback |
Rolls back changes since that last CommitAndRestart() or the last Start() if no restart occurred, afterwards the transaction is not active anymore. This also happens with pending changes when no commit occurrs.
(Inherited from IPersistenceProviderTransactionManager.) | |
| Start |
Starts a database layer transaction, not allowed when one is already active (potential future todo: mapping of nested transactions to a single one).
(Inherited from IPersistenceProviderTransactionManager.) |