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
ConstructorDescriptionCreates a new SailWrapper.NotifyingSailWrapper
(NotifyingSail baseSail) Creates a new SailWrapper that wraps the supplied Sail. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSailChangedListener
(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.void
removeSailChangedListener
(SailChangedListener listener) Removes the specified SailChangedListener so that it no longer receives events from this Sail object.void
setBaseSail
(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, verifyBaseSailSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:StackableSail
Sets the base Sail that this Sail will work on top of. This method will be called before the initialize() method is called.- Specified by:
setBaseSail
in interfaceStackableSail
- Overrides:
setBaseSail
in classSailWrapper
-
getBaseSail
Description copied from interface:StackableSail
Gets the base Sail that this Sail works on top of.- Specified by:
getBaseSail
in interfaceStackableSail
- Overrides:
getBaseSail
in classSailWrapper
-
getConnection
Description copied from interface:Sail
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 interfaceNotifyingSail
- Specified by:
getConnection
in interfaceSail
- Overrides:
getConnection
in classSailWrapper
- Throws:
SailException
- If no transaction could be started, for example because the Sail is not writable.
-
addSailChangedListener
Description copied from interface:NotifyingSail
Adds the specified SailChangedListener to receive events when the data in this Sail object changes.- Specified by:
addSailChangedListener
in interfaceNotifyingSail
-
removeSailChangedListener
Description copied from interface:NotifyingSail
Removes the specified SailChangedListener so that it no longer receives events from this Sail object.- Specified by:
removeSailChangedListener
in interfaceNotifyingSail
-