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
public class NotifyingSailWrapper extends SailWrapper implements NotifyingSail
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
Constructors Constructor Description NotifyingSailWrapper()Creates a new SailWrapper.NotifyingSailWrapper(NotifyingSail baseSail)Creates a new SailWrapper that wraps the supplied Sail.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSailChangedListener(SailChangedListener listener)Adds the specified SailChangedListener to receive events when the data in this Sail object changes.NotifyingSailgetBaseSail()Gets the base Sail that this Sail works on top of.NotifyingSailConnectiongetConnection()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
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
getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, getValueFactory, init, isWritable, setDataDir, shutDown
-
-
-
-
Constructor Detail
-
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
public NotifyingSailWrapper(NotifyingSail baseSail)
Creates a new SailWrapper that wraps the supplied Sail.
-
-
Method Detail
-
setBaseSail
public void setBaseSail(Sail baseSail)
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
public NotifyingSail getBaseSail()
Description copied from interface:StackableSailGets the base Sail that this Sail works on top of.- Specified by:
getBaseSailin interfaceStackableSail- Overrides:
getBaseSailin classSailWrapper
-
getConnection
public NotifyingSailConnection getConnection() throws SailException
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
public void addSailChangedListener(SailChangedListener listener)
Description copied from interface:NotifyingSailAdds the specified SailChangedListener to receive events when the data in this Sail object changes.- Specified by:
addSailChangedListenerin interfaceNotifyingSail
-
removeSailChangedListener
public void removeSailChangedListener(SailChangedListener listener)
Description copied from interface:NotifyingSailRemoves the specified SailChangedListener so that it no longer receives events from this Sail object.- Specified by:
removeSailChangedListenerin interfaceNotifyingSail
-
-