You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/sail/index.adoc
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,9 +178,9 @@ The abstract base classes use the naming convention ``methodname**Internal**`` t
178
178
179
179
For example, the query method `AbstractSailConnection.getStatements()` provides a lot of book keeping: it ensures pending updates are flushed, acquires a read lock on the connection, verifies the connection is still open, and takes care of internally registering the resulting `Iteration` from the query for resource management and concurrency purposes. In between all of this, it calls `getStatementsInternal`. The only job of this method is to answer the query by retrieving the relevant data from the data source.
180
180
181
-
=== NotifyingSail and NotifyingSailConnection
181
+
=== NotifyingSail and AbstractNotifyingSail
182
182
183
-
The `NotifyingSail` and `NotifyingSailConnection` interfaces provide basic event handling for SAIL implementations. Its main goal is to provide a messaging mechanism for closely-linked SAIL implementations (for example, a "Sail stack" where a reasoner is to be kept informed of changes to the underlying database).
183
+
The `NotifyingSail` and `NotifyingSailConnection` interfaces provide basic event handling for SAIL implementations. The main goal of these interfaces is to provide a messaging mechanism for closely-linked SAIL implementations (for example, a "Sail stack" where a reasoner is to be kept informed of changes to the underlying database).
As can be seen in diagram <<figure-notifying-sail>>, the `NotifyingSail` interface provides the option of registering one or more `SailChangedListener` implementations. When registered, the listener will be messaged via the `sailChanged` method. The contents of the message is a `SailChangedEvent` that provides basic info on what has been changed.
225
232
226
233
More fine-grained event data is available at the Connection level. The `NotifyingSailConnection` allows registering a `SailConnectionListener`, which receives a message for each individual statement added or removed on the connection.
227
234
235
+
RDF4J also provides base implementation classes for these two interfaces. As can be seen in diagram <<figure-notifying-sail>>, these classes - `AbstractNotifyingSail` and `AbstractNotifyingSailConnection` - are extensions of the AbstractSail(Connection) classes that add
236
+
default implementations of the methods defined in the NotifyingSail(Connection) interfaces.
0 commit comments