public class BacktrackController
extends java.lang.Object
Red (tfeng) |
Red (tfeng) |
Constructor and Description |
---|
BacktrackController() |
Modifier and Type | Method and Description |
---|---|
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.
|
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.