ptolemy.backtrack
Class CheckpointState

java.lang.Object
  extended by ptolemy.backtrack.CheckpointState

public class CheckpointState
extends java.lang.Object

The current state of a checkpoint object. A checkpoint object stores its complete state in its CheckpointState object. Different checkpoint objects may share the same state, and hence they represent the same checkpoint entity.

When two checkpoint objects are merged, they exchange their states and compute the union of the two.

Since:
Ptolemy II 5.1
Version:
$Id: CheckpointState.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Thomas Feng
Accepted Rating:
Red (tfeng)
Proposed Rating:
Red (tfeng)

Field Summary
private static long _currentTimestamp
          The current timestamp.
private  java.util.List<Rollbackable> _monitoredObjects
          The list of objects monitored by the checkpoint object.
 
Constructor Summary
CheckpointState()
           
 
Method Summary
 long createCheckpoint()
          Create a new checkpoint, and return the new timestamp.
 java.util.List<Rollbackable> getMonitoredObjects()
          Get the list of all the monitored objects.
 long getTimestamp()
          Get the current timestamp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_currentTimestamp

private static long _currentTimestamp
The current timestamp. It is static, so different checkpoint states use different timestamps, and the timestamps are always increasing in the time line.


_monitoredObjects

private java.util.List<Rollbackable> _monitoredObjects
The list of objects monitored by the checkpoint object.

Constructor Detail

CheckpointState

public CheckpointState()
Method Detail

createCheckpoint

public long createCheckpoint()
Create a new checkpoint, and return the new timestamp.

Returns:
The new timestamp.

getMonitoredObjects

public java.util.List<Rollbackable> getMonitoredObjects()
Get the list of all the monitored objects.

Returns:
The list of all the monitored objects.

getTimestamp

public long getTimestamp()
Get the current timestamp.

Returns:
The current timestamp.