|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.backtrack.ui.BacktrackController
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 state.
Red (tfeng) |
Red (tfeng) |
Field Summary | |
---|---|
private java.util.HashMap<java.lang.Long,java.util.HashMap<Checkpoint,java.lang.Long>> |
_checkpoints
The map from checkpoint handles used in this class to checkpoint handles used in the checkpointing sub-system. |
private long |
_currentHandle
The current checkpoint handle. |
Constructor Summary | |
---|---|
BacktrackController()
|
Method Summary | |
---|---|
void |
commit(long handle)
Commit a checkpoint handle. |
long |
createCheckpoint(CompositeActor container)
Create a checkpoint for the given composite actor, and return the checkpoint handle. |
boolean |
rollback(long handle,
boolean trim)
Roll back the system state with the records in the checkpoint with the given handle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.HashMap<java.lang.Long,java.util.HashMap<Checkpoint,java.lang.Long>> _checkpoints
private long _currentHandle
Constructor Detail |
---|
public BacktrackController()
Method Detail |
---|
public void commit(long handle)
handle
- The handle of the checkpoint to be committed.public long createCheckpoint(CompositeActor container)
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
created.
public boolean rollback(long handle, boolean trim)
handle
- The checkpoint handle previous returned by createCheckpoint(CompositeActor)
.trim
- Whether the records in the checkpoint should be deleted. If
the records are deleted, memory is freed, but lazy computation is
impossible.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |