Package org.eclipse.rdf4j.sail.base
Interface SailSource
- All Superinterfaces:
AutoCloseable,SailClosable
- All Known Implementing Classes:
BackingSailSource
A persistent yet mutable source or container of RDF graphs. In which its state can change over time. The life cycle
follows that of a store and/or transactions. The
SailClosable.close() is only applicable to results from
fork(), not to the backing SailSource itself.- Author:
- James Leigh
-
Method Summary
Modifier and TypeMethodDescriptiondataset(IsolationLevel level) Create an observableSailDatasetof the current state of thisSailSource.voidflush()Apply all the changes to this branch to the backingSailSource, if applicable.fork()Creates a new branch of this source.voidprepare()Check the consistency of this branch and throws aSailConflictExceptionifflush()ing this branch would cause the backingSailSourceto be inconsistent, if applicable.sink(IsolationLevel level) Methods inherited from interface org.eclipse.rdf4j.sail.base.SailClosable
close
-
Method Details
-
fork
SailSource fork()Creates a new branch of this source. When it'sflush()is called the changes are applied to this backing source.- Returns:
- a branched
SailSource.
-
sink
- Parameters:
level- If this level is compatible withIsolationLevels.SERIALIZABLEthen aSailSink.prepare()can throw aSailConflictException.- Returns:
- Newly created
SailSink - Throws:
SailException
-
dataset
Create an observableSailDatasetof the current state of thisSailSource. Repeatedly calling with methods withIsolationLevels.SNAPSHOT(or higher) isolation levels will result inSailDatasets that are all derived from the same state of the backingSailSource(if applicable), that is the only difference between the states of theSailDatasetwill be from changes using thissink(IsolationLevel).- Parameters:
level- If this is compatible withIsolationLevels.SNAPSHOT_READthe resultingSailDatasetwill observe a single state of thisSailSource.- Returns:
- an
SailDatasetof the current state - Throws:
SailException
-
prepare
Check the consistency of this branch and throws aSailConflictExceptionifflush()ing this branch would cause the backingSailSourceto be inconsistent, if applicable. If this is the final backingSailSourcecalling this method has no effect.- Throws:
SailException
-
flush
Apply all the changes to this branch to the backingSailSource, if applicable. If this is the final backingSailSourcecalling this method has no effect.- Throws:
SailException
-