Package org.eclipse.rdf4j.sail.base
Interface SailSource
-
- All Superinterfaces:
AutoCloseable,SailClosable
- All Known Implementing Classes:
BackingSailSource
public interface SailSource extends SailClosable
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. TheSailClosable.close()is only applicable to results fromfork(), not to the backingSailSourceitself.- Author:
- James Leigh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SailDatasetdataset(IsolationLevel level)Create an observableSailDatasetof the current state of thisSailSource.voidflush()Apply all the changes to this branch to the backingSailSource, if applicable.SailSourcefork()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.SailSinksink(IsolationLevel level)-
Methods inherited from interface org.eclipse.rdf4j.sail.base.SailClosable
close
-
-
-
-
Method Detail
-
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
SailSink sink(IsolationLevel level) throws SailException
- Parameters:
level- If this level is compatible withIsolationLevels.SERIALIZABLEthen aSailSink.prepare()can throw aSailConflictException.- Returns:
- Newly created
SailSink - Throws:
SailException
-
dataset
SailDataset dataset(IsolationLevel level) throws SailException
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
void prepare() throws SailExceptionCheck 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
void flush() throws SailExceptionApply all the changes to this branch to the backingSailSource, if applicable. If this is the final backingSailSourcecalling this method has no effect.- Throws:
SailException
-
-