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
Constructors -
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.protected abstract NotifyingSailConnectionReturns a store-specific SailConnection object.voidNotifies all registered SailChangedListener's of changes to the contents of this Sail.voidremoveSailChangedListener(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, getDefaultQueryEvaluationMode, getIterationCacheSyncThreshold, getSupportedIsolationLevels, init, initializeInternal, isInitialized, isTrackResultSize, removeSupportedIsolationLevel, setConnectionTimeOut, setDataDir, setDefaultIsolationLevel, setDefaultQueryEvaluationMode, setIterationCacheSyncThreshold, setSupportedIsolationLevels, setSupportedIsolationLevels, setTrackResultSize, shutDown, shutDownInternal, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.rdf4j.sail.Sail
getCollectionFactory, getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, getValueFactory, init, isWritable, setDataDir, shutDown
-
Constructor Details
-
AbstractNotifyingSail
public AbstractNotifyingSail()
-
-
Method Details
-
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 classAbstractSail- Throws:
SailException- If no transaction could be started, for example because the Sail is not writable.
-
getConnectionInternal
Description copied from class:AbstractSailReturns a store-specific SailConnection object.- Specified by:
getConnectionInternalin classAbstractSail- Returns:
- A connection to the store.
- Throws:
SailException
-
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
-
notifySailChanged
Notifies all registered SailChangedListener's of changes to the contents of this Sail.
-