org.eclipse.rdf4j.sail

## Interface NotifyingSail

- All Superinterfaces:
    Sail
  All Known Implementing Classes:
    AbstractForwardChainingInferencer, AbstractNotifyingSail, CustomGraphQueryInferencer, DedupingInferencer, DirectTypeHierarchyInferencer, ElasticsearchStore, ExtensibleStore, ForwardChainingRDFSInferencer, LimitedSizeNativeStore, LuceneSail, LuceneSpinSail, MemoryStore, NativeStore, NotifyingSailBase, NotifyingSailWrapper, SchemaCachingRDFSInferencer, ShaclSail, SpinSail

      public interface NotifyingSail
      extends Sail

  An interface for `Sail`s that notify registered `SailChangedListener`s of changes in the data in the Sail.
  Author:
    James Leigh

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSailChangedListener(SailChangedListener listener)` Adds the specified SailChangedListener to receive events when the data in this Sail object changes.
    `NotifyingSailConnection` | `getConnection()` Opens a connection on the Sail which can be used to query and update data.
    `void` | `removeSailChangedListener(SailChangedListener listener)` Removes the specified SailChangedListener so that it no longer receives events from this Sail object.

    - ### Methods inherited from interface org.eclipse.rdf4j.sail.Sail

      `getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, getValueFactory, init, initialize, isWritable, setDataDir, shutDown`

- - ### Method Detail

    - #### getConnection

          NotifyingSailConnection getConnection()
                                         throws SailException

      Opens a connection on the Sail which can be used to query and update data. Depending on how the implementation handles concurrent access, a call to this method might block when there is another open connection on this Sail.
      Specified by:
        `getConnection` in interface `Sail`
      Throws:
        `SailException` - If no transaction could be started, for example because the Sail is not writable.

    - #### addSailChangedListener

          void addSailChangedListener(SailChangedListener listener)

      Adds the specified SailChangedListener to receive events when the data in this Sail object changes.

    - #### removeSailChangedListener

          void removeSailChangedListener(SailChangedListener listener)

      Removes the specified SailChangedListener so that it no longer receives events from this Sail object.

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