Class MonitorModel

All Implemented Interfaces:
Model, ModelCon, ModelGraphInterface, RDFReaderF, RDFWriterF, Lock, PrefixMapping

public class MonitorModel extends ModelCom
Model wrapper which provides normal access to an underlying model but also maintains a snapshot of the triples it was last known to contain. A snapshot action causes the set of changes between this and the previous snapshot to be calculated and the cache updated. The snapshot process will also fire change notification.
  • Constructor Details

    • MonitorModel

      public MonitorModel(Model base)
      Create a monitor over the given underlying base model.
  • Method Details

    • snapshot

      public void snapshot(List<Statement> additions, List<Statement> deletions)
      Compute the differences between the current monitored graph and the last snapshot. The changes will also be forwarded to any listeners. Then take a new snapshot.
      Parameters:
      additions - a place in which the set of newly added statements should be noted, can be null
      deletions - a place in which the set of newly deleted statements should be noted, can be null
    • snapshot

      public void snapshot()
      Compute the differences between the current monitored graph and the last snapshot, forward any changes to registered listeners, then take a new snapshot.