Interface for listening to graph-level update events. Each time the graph is poked to add or remove some triples, and after that poke has completed without throwing an exception, all the listeners attached to the Graph are informed about the poke.
The notifications are, in general, given before further changes to the graph are made. Listeners are discouraged from making further modifications to the same graph since that will invalidate this property for other listeners.
Some modifications may result in multiple notifications in some cases. For example, a bulk notification with {@link #notifyAddArray(Graph,Triple[])}, may, or may not, be accompanied by several {@link #notifyAddTriple(Graph,Triple)}notifications, one for each triple. If possible, Graph implementations should avoid such duplicate notifications and only give the bulk notifications, see {@link com.hp.hpl.jena.graph.impl.GraphWithPerform}. When these duplicate notifications occur, each should happen immediately after the change it signifies is complete. Thus, in the previous example, if the array has two triples, the pattern is:
- The first triple is added.
- {@link #notifyAddTriple(Graph,Triple)} for the first triple.
- The second triple is added.
- {@link #notifyAddTriple(Graph,Triple)} for the second triple.
- {@link #notifyAddArray(Graph,Triple[])} for the array.
To track all changes to a graph it is necessary to consider all the methods in this interface, including {@link #notifyEvent(Graph,Object)}.