org.eclipse.viatra.transformation.runtime.emf.changemonitor

## Class IChangeMonitor

- java.lang.Object
- - org.eclipse.viatra.transformation.runtime.emf.changemonitor.IChangeMonitor

- Direct Known Subclasses:
    ChangeMonitor

      public abstract class IChangeMonitor
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IChangeMonitor(ViatraQueryEngine engine)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract ChangeDelta` | `createCheckpoint()` Creates a checkpoint which means: Model changes since the last checkpont are saved The model changes in the future are tracked separately from the changes before the checkpoint
    `abstract ChangeDelta` | `getDeltaSinceLastCheckpoint()` Returns all changed elements between the last two checkpoints
    `abstract void` | `startMonitoring()` Sets the model whose changes are observed.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IChangeMonitor

          public IChangeMonitor(ViatraQueryEngine engine)

  - ### Method Detail

    - #### startMonitoring

          public abstract void startMonitoring()
                                        throws ViatraQueryException

      Sets the model whose changes are observed. Also creates an initial checkpoint with no changes registered.
      Parameters:
        `deployment` - the deployment model
        `engine` - engine associated with the
      Throws:
        `ViatraQueryException`

    - #### createCheckpoint

          public abstract ChangeDelta createCheckpoint()

      Creates a checkpoint which means:
    - Model changes since the last checkpont are saved
    - The model changes in the future are tracked separately from the changes before the checkpoint

Returns:
  the DTO containing the changed elements since the last checkpoint

- #### getDeltaSinceLastCheckpoint

      public abstract ChangeDelta getDeltaSinceLastCheckpoint()

  Returns all changed elements between the last two checkpoints
  Returns:
    the DTO containing the changed elements