Package org.eclipse.rdf4j.sail.helpers
Class AbstractNotifyingSail
java.lang.Object
org.eclipse.rdf4j.sail.helpers.AbstractSail
org.eclipse.rdf4j.sail.helpers.AbstractNotifyingSail
- All Implemented Interfaces:
NotifyingSail
,Sail
- Direct Known Subclasses:
ExtensibleStore
,LmdbStore
,MemoryStore
,NativeStore
A base
NotifyingSail
implementation that takes care of common sail tasks, including proper closing of active
connections and a grace period for active connections during shutdown of the store.- Author:
- Herko ter Horst, jeen, Arjohn Kampman
-
Field Summary
Fields inherited from class org.eclipse.rdf4j.sail.helpers.AbstractSail
connectionTimeOut, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_ITERATION_SYNC_THRESHOLD, initializationLock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSailChangedListener
(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.protected abstract NotifyingSailConnection
Returns a store-specific SailConnection object.void
Notifies all registered SailChangedListener's of changes to the contents of this Sail.void
removeSailChangedListener
(SailChangedListener listener) Removes the specified SailChangedListener so that it no longer receives events from this Sail object.Methods inherited from class org.eclipse.rdf4j.sail.helpers.AbstractSail
addSupportedIsolationLevel, connectionClosed, debugEnabled, getDataDir, getDefaultIsolationLevel, getIterationCacheSyncThreshold, getSupportedIsolationLevels, init, initializeInternal, isInitialized, isTrackResultSize, removeSupportedIsolationLevel, setConnectionTimeOut, setDataDir, setDefaultIsolationLevel, setIterationCacheSyncThreshold, setSupportedIsolationLevels, setSupportedIsolationLevels, setTrackResultSize, shutDown, shutDownInternal, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.rdf4j.sail.Sail
getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, getValueFactory, init, isWritable, setDataDir, shutDown
-
Constructor Details
-
AbstractNotifyingSail
public AbstractNotifyingSail()
-
-
Method Details
-
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 classAbstractSail
- Throws:
SailException
- If no transaction could be started, for example because the Sail is not writable.
-
getConnectionInternal
Description copied from class:AbstractSail
Returns a store-specific SailConnection object.- Specified by:
getConnectionInternal
in classAbstractSail
- Returns:
- A connection to the store.
- Throws:
SailException
-
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
-
notifySailChanged
Notifies all registered SailChangedListener's of changes to the contents of this Sail.
-