|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.backtrack.Checkpoint
public class Checkpoint
The class of checkpoint objects. A checkpoint object represents the smallest
entity on which checkpoints are created and managed. It monitors one or more
objects. When the rollback(long, boolean)
function is called, all
the monitored objects are rolled back to their previous states, defined by a
timestamp.
Red (tfeng) |
Red (tfeng) |
Field Summary | |
---|---|
private CheckpointState |
_state
The current state of the checkpoint object. |
Constructor Summary | |
---|---|
Checkpoint(Rollbackable object)
Construct a checkpoint object with an initial object in its monitored object list. |
Method Summary | |
---|---|
void |
addObject(Rollbackable object)
Add an object to the monitored object list. |
void |
commit(long timestamp)
Commit the changes on all the monitored objects up to the given timestamp. |
long |
createCheckpoint()
Create a new checkpoint and return its handle. |
long |
getTimestamp()
Get the current timestamp (also considered as the last created handle). |
boolean |
isCheckpointing()
Test if the checkpointing facility is running. |
void |
removeObject(Rollbackable object)
Remove an object from the monitored object list. |
void |
rollback(long timestamp)
Rollback all the monitored objects to their previous states defined by the given timestamp (or, handle). |
void |
rollback(long timestamp,
boolean trim)
Rollback all the monitored objects to their previous states defined by the given timestamp (or, handle). |
void |
setCheckpoint(Checkpoint checkpoint)
Set this checkpoint object to be the same as the given checkpoint object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private CheckpointState _state
Constructor Detail |
---|
public Checkpoint(Rollbackable object)
object
- The first object to be placed in the list, or
null if the list is intended to be empty.Method Detail |
---|
public void addObject(Rollbackable object)
object
- The object to be added.public void commit(long timestamp)
timestamp
- The timestamp.public long createCheckpoint()
public long getTimestamp()
public boolean isCheckpointing()
public void removeObject(Rollbackable object)
object
- The object to be removed.public void rollback(long timestamp)
timestamp
- The timestamp taken at a previous time.rollback(long, boolean)
public void rollback(long timestamp, boolean trim)
timestamp
- The timestamp taken at a previous time.trim
- Whether to delete the records used for the rollback.public void setCheckpoint(Checkpoint checkpoint)
checkpoint
- The given checkpoint object to be merged with this
one.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |