Package org.eclipse.rdf4j.sail.helpers
Class NotifyingSailWrapper
java.lang.Object
org.eclipse.rdf4j.sail.helpers.SailWrapper
org.eclipse.rdf4j.sail.helpers.NotifyingSailWrapper
- All Implemented Interfaces:
FederatedServiceResolverClient,NotifyingSail,Sail,StackableSail
- Direct Known Subclasses:
AbstractForwardChainingInferencer,CustomGraphQueryInferencer,DedupingInferencer,DirectTypeHierarchyInferencer,LuceneSail,SchemaCachingRDFSInferencer,ShaclSail
An implementation of the StackableSail interface that wraps another Sail object and forwards any relevant calls to
the wrapped Sail.
- Author:
- Arjohn Kampman
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SailWrapper.NotifyingSailWrapper(NotifyingSail baseSail) Creates a new SailWrapper that wraps the supplied Sail. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSailChangedListener(SailChangedListener listener) Adds the specified SailChangedListener to receive events when the data in this Sail object changes.Gets the base Sail that this Sail works on top of.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.voidsetBaseSail(Sail baseSail) Sets the base Sail that this Sail will work on top of.Methods inherited from class org.eclipse.rdf4j.sail.helpers.SailWrapper
getCollectionFactory, getDataDir, getDefaultIsolationLevel, getFederatedServiceResolver, getSupportedIsolationLevels, getValueFactory, init, isWritable, setDataDir, setFederatedServiceResolver, shutDown, verifyBaseSailSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.rdf4j.sail.Sail
getCollectionFactory, getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, getValueFactory, init, isWritable, setDataDir, shutDown
-
Constructor Details
-
NotifyingSailWrapper
public NotifyingSailWrapper()Creates a new SailWrapper. The base Sail for the created SailWrapper can be set later usingsetBaseSail(org.eclipse.rdf4j.sail.Sail). -
NotifyingSailWrapper
Creates a new SailWrapper that wraps the supplied Sail.
-
-
Method Details
-
setBaseSail
Description copied from interface:StackableSailSets the base Sail that this Sail will work on top of. This method will be called before the initialize() method is called.- Specified by:
setBaseSailin interfaceStackableSail- Overrides:
setBaseSailin classSailWrapper
-
getBaseSail
Description copied from interface:StackableSailGets the base Sail that this Sail works on top of.- Specified by:
getBaseSailin interfaceStackableSail- Overrides:
getBaseSailin classSailWrapper
-
getConnection
Description copied from interface:SailOpens 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 interfaceNotifyingSail- Specified by:
getConnectionin interfaceSail- Overrides:
getConnectionin classSailWrapper- Throws:
SailException- If no transaction could be started, for example because the Sail is not writable.
-
addSailChangedListener
Description copied from interface:NotifyingSailAdds the specified SailChangedListener to receive events when the data in this Sail object changes.- Specified by:
addSailChangedListenerin interfaceNotifyingSail
-
removeSailChangedListener
Description copied from interface:NotifyingSailRemoves the specified SailChangedListener so that it no longer receives events from this Sail object.- Specified by:
removeSailChangedListenerin interfaceNotifyingSail
-