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 observableSailDataset
of the current state of thisSailSource
.void
flush()
Apply all the changes to this branch to the backingSailSource
, if applicable.fork()
Creates a new branch of this source.void
prepare()
Check the consistency of this branch and throws aSailConflictException
ifflush()
ing this branch would cause the backingSailSource
to 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.SERIALIZABLE
then aSailSink.prepare()
can throw aSailConflictException
.- Returns:
- Newly created
SailSink
- Throws:
SailException
-
dataset
Create an observableSailDataset
of the current state of thisSailSource
. Repeatedly calling with methods withIsolationLevels.SNAPSHOT
(or higher) isolation levels will result inSailDataset
s that are all derived from the same state of the backingSailSource
(if applicable), that is the only difference between the states of theSailDataset
will be from changes using thissink(IsolationLevel)
.- Parameters:
level
- If this is compatible withIsolationLevels.SNAPSHOT_READ
the resultingSailDataset
will observe a single state of thisSailSource
.- Returns:
- an
SailDataset
of the current state - Throws:
SailException
-
prepare
Check the consistency of this branch and throws aSailConflictException
ifflush()
ing this branch would cause the backingSailSource
to be inconsistent, if applicable. If this is the final backingSailSource
calling 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 backingSailSource
calling this method has no effect.- Throws:
SailException
-