Interface NotifyingSail
- All Superinterfaces:
Sail
- All Known Implementing Classes:
AbstractForwardChainingInferencer, AbstractNotifyingSail, CustomGraphQueryInferencer, DedupingInferencer, DirectTypeHierarchyInferencer, ElasticsearchStore, ExtensibleStore, LmdbStore, LuceneSail, MemoryStore, NativeStore, NotifyingSailWrapper, SchemaCachingRDFSInferencer, ShaclSail
An interface for
Sails that notify registered SailChangedListeners of changes in the data in the
Sail.- Author:
- James Leigh
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSailChangedListener(SailChangedListener listener) Adds the specified SailChangedListener to receive events when the data in this Sail object changes.Opens a connection on the Sail which can be used to query and update data.voidremoveSailChangedListener(SailChangedListener listener) Removes the specified SailChangedListener so that it no longer receives events from this Sail object.Methods inherited from interface Sail
getCollectionFactory, getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, getValueFactory, init, isWritable, setDataDir, shutDownModifier and TypeMethodDescriptiondefault Supplier<CollectionFactory> Gets a CollectionFactory that may be optimized for this store and may or may not use disk or other resources.Gets the Sail's data directory.Retrieves the defaultIsolationLevellevel on which transactions in this Sail operate.Retrieve theIsolationLevels supported by this SAIL, ordered by increasing complexity.Gets a ValueFactory object that can be used to create IRI-, blank node-, literal- and statement objects.voidinit()Initializes the Sail.booleanChecks whether this Sail object is writable, i.e. if the data contained in this Sail object can be changed.voidsetDataDir(File dataDir) Sets the data directory for the Sail.voidshutDown()Shuts down the Sail, giving it the opportunity to synchronize any stale data.
-
Method Details
-
getConnection
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:
getConnectionin interfaceSail- Throws:
SailException- If no transaction could be started, for example because the Sail is not writable.
-
addSailChangedListener
Adds the specified SailChangedListener to receive events when the data in this Sail object changes. -
removeSailChangedListener
Removes the specified SailChangedListener so that it no longer receives events from this Sail object.
-