Click or drag to resize

BaseTransactionalQuadDataset Class

Abstract Base class for quad datasets that support transactions.
Inheritance Hierarchy

Namespace:  VDS.RDF.Query.Datasets
Assembly:  dotNetRDF (in dotNetRDF.dll) Version:
Syntax
public abstract class BaseTransactionalQuadDataset : BaseQuadDataset

The BaseTransactionalQuadDataset type exposes the following members.

Constructors
  NameDescription
Public methodBaseTransactionalQuadDataset
Creates a Transactional Quad Dataset.
Public methodBaseTransactionalQuadDataset(Boolean)
Creates a Transactional Quad Dataset.
Public methodBaseTransactionalQuadDataset(Uri)
Creates a Transactional Quad Dataset.
Top
Properties
  NameDescription
Public propertyActiveGraphUris
Gets the Active Graph URIs.
(Inherited from BaseQuadDataset.)
Public propertyDefaultGraphUris
Gets the Default Graph URIs.
(Inherited from BaseQuadDataset.)
Public propertyGraphs
Gets the Graphs in the dataset.
(Inherited from BaseQuadDataset.)
Public propertyGraphUris
Gets the URIs of the graphs in the dataset.
(Inherited from BaseQuadDataset.)
Public propertyHasTriples
Gets whether the dataset has any triples.
(Inherited from BaseQuadDataset.)
Public propertyItem
Gets a Graph from the dataset.
(Overrides BaseQuadDatasetItemUri.)
Public propertyTriples
Gets all triples from the dataset.
(Inherited from BaseQuadDataset.)
Public propertyUsesUnionDefaultGraph
Gets whether this dataset uses a union default graph.
(Inherited from BaseQuadDataset.)
Top
Methods
  NameDescription
Public methodAddGraph
Adds a Graph to the Dataset.
(Overrides BaseQuadDatasetAddGraph(IGraph).)
Protected methodAddGraphInternal
Adds a Graph to the Dataset.
Protected methodAddQuad
Adds a Quad to the Dataset.
(Inherited from BaseQuadDataset.)
Protected methodContainsQuad
Gets whether a Triple exists in a specific Graph of the dataset.
(Inherited from BaseQuadDataset.)
Public methodContainsTriple
Gets whether the dataset contains a triple.
(Inherited from BaseQuadDataset.)
Public methodDiscard
Ensures that any changes to the Dataset (if any) are discarded.
(Overrides BaseQuadDatasetDiscard.)
Protected methodDiscardInternal
Allows the derived dataset to take any post-Discard() actions required.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFlush
Ensures that any changes to the Dataset (if any) are flushed to the underlying Storage.
(Overrides BaseQuadDatasetFlush.)
Protected methodFlushInternal
Allows the derived dataset to take any post-Flush() actions required.
Protected methodGetGraphInternal
Gets a Graph from the dataset.
(Inherited from BaseQuadDataset.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetModifiableGraph
Gets a Graph from the Dataset that can be modified.
(Overrides BaseQuadDatasetGetModifiableGraph(Uri).)
Protected methodGetModifiableGraphInternal
Gets a Graph from the Dataset that can be modified transactionally.
Protected methodGetQuads
Gets all the Triples for a specific graph of the dataset.
(Inherited from BaseQuadDataset.)
Protected methodGetQuadsWithObject
Gets all the Triples with a given object from a specific graph of the dataset.
(Inherited from BaseQuadDataset.)
Protected methodGetQuadsWithPredicate
Gets all the Triples with a given predicate from a specific graph of the dataset.
(Inherited from BaseQuadDataset.)
Protected methodGetQuadsWithPredicateObject
Gets all the Triples with a given predicate and object from a specific graph of the dataset.
(Inherited from BaseQuadDataset.)
Protected methodGetQuadsWithSubject
Gets all the Triples with a given subject from a specific graph of the dataset.
(Inherited from BaseQuadDataset.)
Protected methodGetQuadsWithSubjectObject
Gets all the Triples with a given subject and object from a specific graph of the dataset.
(Inherited from BaseQuadDataset.)
Protected methodGetQuadsWithSubjectPredicate
Gets all the Triples with a given subject and predicate from a specific graph of the dataset.
(Inherited from BaseQuadDataset.)
Public methodGetTriplesWithObject
Gets all the Triples with a given object.
(Inherited from BaseQuadDataset.)
Public methodGetTriplesWithPredicate
Gets all the Triples with a given predicate.
(Inherited from BaseQuadDataset.)
Public methodGetTriplesWithPredicateObject
Gets all the Triples with a given predicate and object.
(Inherited from BaseQuadDataset.)
Public methodGetTriplesWithSubject
Gets all the Triples with a given subject.
(Inherited from BaseQuadDataset.)
Public methodGetTriplesWithSubjectObject
Gets all the Triples with a given subject and object.
(Inherited from BaseQuadDataset.)
Public methodGetTriplesWithSubjectPredicate
Gets all the Triples with a given subject and predicate.
(Inherited from BaseQuadDataset.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasGraph
Gets whether a Graph with the given URI is the Dataset.
(Inherited from BaseQuadDataset.)
Protected methodHasGraphInternal
Determines whether a given Graph exists in the Dataset.
(Inherited from BaseQuadDataset.)
Protected methodIsDefaultGraph
Gets whether the given URI represents the default graph of the dataset.
(Inherited from BaseQuadDataset.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemoveGraph
Removes a Graph from the Dataset.
(Overrides BaseQuadDatasetRemoveGraph(Uri).)
Protected methodRemoveGraphInternal
Removes a Graph from the dataset.
Protected methodRemoveQuad
Removes a Quad from the Dataset.
(Inherited from BaseQuadDataset.)
Public methodResetActiveGraph
Resets the Active Graph.
(Inherited from BaseQuadDataset.)
Public methodResetDefaultGraph
Resets the Default Graph.
(Inherited from BaseQuadDataset.)
Public methodSetActiveGraph(IEnumerableUri)
Sets the Active Graph.
(Inherited from BaseQuadDataset.)
Public methodSetActiveGraph(Uri)
Sets the Active Graph.
(Inherited from BaseQuadDataset.)
Public methodSetDefaultGraph(IEnumerableUri)
Sets the Default Graph.
(Inherited from BaseQuadDataset.)
Public methodSetDefaultGraph(Uri)
Sets the Default Graph.
(Inherited from BaseQuadDataset.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

The Transaction implementation of dotNetRDF is based upon a MRSW concurrency model, since only one writer may be active changes are immediately pushed to the dataset and visible within the transaction and they are committed or rolled back when Flush() or Discard() are called.

So in practical terms it is perfectly OK for the storage to be updated during a transaction because if the transaction fails the changes will be rolled back because all changes are stored in-memory until the end of the transaction. This may not be an ideal transaction model for all scenarios so you may wish to implement your own version of transactions or code your implementations of the abstract methods accordingly to limit actual persistence to the end of a transaction.

See Also