public class BacktrackController
Backtracking controller for composite actors. This controller is built on top
of the backtracking sub-system. It helps to create checkpoints for Ptolemy II
composite actors. Each of those checkpoints may correspond to multiple
checkpoints in the backtracking sub-system, due to the fact that entities in
a composite actor may be monitored by different checkpoint objects. This
controller also allows to roll back the composite actor to its previous
Commit a checkpoint handle. After it is committed, the system can no
longer roll back to that checkpoint, or any other checkpoint taken
before that one. Memory allocated for the committed checkpoints will be
handle - The handle of the checkpoint to be committed.
Create a checkpoint for the given composite actor, and return the
This checkpoint handle is different from the checkpoint handles returned
by Checkpoint.createCheckpoint(), which are the internal
representations of checkpoint timestamps. This checkpoint handle,
however, refers to a collection of checkpoint timestamps for different
checkpoint objects that manage different entities in the container.
The returned checkpoint handle can only be used with commit(long) and rollback(long, boolean) in this class.
container - The composite actor for which a checkpoint will be
The checkpoint handle.
public boolean rollback(long handle,
Roll back the system state with the records in the checkpoint with the
If the checkpoint objects that monitor the entities in the composite
actor are not changed since the time when the checkpoint was created,
this rollback only affects that composite actor and its children. This
is true in most of the cases, but it is not guaranteed.