Click or drag to resize

IPersistenceProvider Interface

An interface to be implemented by classes that allow to persist changes to a named graph to some kind of repository.

Namespace:  de.unika.ipd.grGen.libGr
Assembly:  libGr (in libGr.dll) Version: GrGen.NET 8.0
Syntax
C#
public interface IPersistenceProvider : IPersistenceProviderStatistics, 
	IPersistenceProviderTransactionManager

The IPersistenceProvider type exposes the following members.

Properties
  NameDescription
Public propertyIsActive
Tells whether a/the transaction is active.
(Inherited from IPersistenceProviderTransactionManager.)
Public propertyNumEdgesInDatabase
Returns the number of edges in all graphs known to the database.
(Inherited from IPersistenceProviderStatistics.)
Public propertyNumGraphsInDatabase
Returns the number of graphs known to the database.
(Inherited from IPersistenceProviderStatistics.)
Public propertyNumNodesInDatabase
Returns the number of nodes in all graphs known to the database.
(Inherited from IPersistenceProviderStatistics.)
Public propertyNumObjectsInDatabase
Returns the number of (internal class) objects known to the database.
(Inherited from IPersistenceProviderStatistics.)
Top
Methods
  NameDescription
Public methodClose
closes the repository / disconnects from the respository
Public methodCommit
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.)
Public methodCommitAndRestart
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.)
Public methodOpen
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
Public methodReadPersistentGraphAndRegisterToListenToGraphModifications
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)
Public methodRegisterToListenToProcessingEnvironmentEvents
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)
Public methodRollback
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.)
Public methodStart
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.)
Top
See Also