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 backingSailSource
itself.- Author:
- James Leigh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SailDataset
dataset(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.SailSource
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.SailSink
sink(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.SERIALIZABLE
then aSailSink.prepare()
can throw aSailConflictException
.- Returns:
- Newly created
SailSink
- Throws:
SailException
-
dataset
SailDataset dataset(IsolationLevel level) throws SailException
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
void prepare() throws SailException
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
void flush() throws SailException
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
-
-