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. The `SailClosable.close()` is only applicable to results from `fork()`, not to the backing `SailSource` itself.
  Author:
    James Leigh

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `SailDataset` | `dataset(IsolationLevel level)` Create an observable `SailDataset` of the current state of this `SailSource`.
    `void` | `flush()` Apply all the changes to this branch to the backing `SailSource`, if applicable.
    `SailSource` | `fork()` Creates a new branch of this source.
    `void` | `prepare()` Check the consistency of this branch and throws a `SailConflictException` if `flush()`ing this branch would cause the backing `SailSource` to be inconsistent, if applicable.
    `SailSink` | `sink(IsolationLevel level)` Create a `SailSink` that when when its `flush()` is called, the changes are applied to this source.

    - ### 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's `flush()` is called the changes are applied to this backing source.
      Returns:
        a branched `SailSource`.

    - #### sink

          SailSink sink(IsolationLevel level)
                 throws SailException

      Create a `SailSink` that when when its `flush()` is called, the changes are applied to this source.
      Parameters:
        `level` - If this level is compatible with `IsolationLevels.SERIALIZABLE` then a `SailSink.prepare()` can throw a `SailConflictException`.
      Returns:
        Newly created `SailSink`
      Throws:
        `SailException`

    - #### dataset

          SailDataset dataset(IsolationLevel level)
                       throws SailException

      Create an observable `SailDataset` of the current state of this `SailSource`. Repeatedly calling with methods with `IsolationLevels.SNAPSHOT` (or higher) isolation levels will result in `SailDataset`s that are all derived from the same state of the backing `SailSource` (if applicable), that is the only difference between the states of the `SailDataset` will be from changes using this `sink(IsolationLevel)`.
      Parameters:
        `level` - If this is compatible with `IsolationLevels.SNAPSHOT_READ` the resulting `SailDataset` will observe a single state of this `SailSource`.
      Returns:
        an `SailDataset` of the current state
      Throws:
        `SailException`

    - #### prepare

          void prepare()
                throws SailException

      Check the consistency of this branch and throws a `SailConflictException` if `flush()`ing this branch would cause the backing `SailSource` to be inconsistent, if applicable. If this is the final backing `SailSource` calling this method has no effect.
      Throws:
        `SailException`

    - #### flush

          void flush()
              throws SailException

      Apply all the changes to this branch to the backing `SailSource`, if applicable. If this is the final backing `SailSource` calling this method has no effect.
      Throws:
        `SailException`

Copyright © 2015-2021 Eclipse Foundation. All Rights Reserved.