ptolemy.backtrack
Interface Rollbackable

All Known Implementing Classes:
Accumulator, ArrayPeakSearch, Autocorrelation, Autocorrelation.FunctionTerm, Autocorrelation.OutputTypeTerm, Average, BooleanSelect, BooleanSwitch, Chop, Commutator, Commutator.WidthDependentParameter, ComputeHistogram, Counter, DB, DelayLine, Differential, Distributor, Distributor.WidthDependentParameter, DoubleReader, FFT, Gaussian, GradientAdaptiveLattice, IFFT, IIR, Interpolator, LinearDifferenceEquationSystem, Multiplexor, OrderedMerge, PhaseUnwrap, PoissonClock, Pulse, Ramp, RandomSource, Recorder, RecursiveLattice, Select, Sequence, Sequencer, SequentialClock, Switch

public interface Rollbackable

The interface of rollbackable objects.

Since:
Ptolemy II 5.1
Version:
$Id: Rollbackable.java 53095 2009-04-12 19:12:45Z cxh $
Author:
Thomas Feng
Accepted Rating:
Red (tfeng)
Proposed Rating:
Red (tfeng)

Method Summary
 void $COMMIT(long timestamp)
          Commit changes up to the given timestamp, but not including changes made at timestamp and afterward.
 Checkpoint $GET$CHECKPOINT()
          Get the checkpoint object that monitors this rollbackable object.
 void $RESTORE(long timestamp, boolean trim)
          Restore a previous state to all the private fields of this rollbackable object.
 java.lang.Object $SET$CHECKPOINT(Checkpoint checkpoint)
          Set the checkpoint object of this rollbackable object.
 

Method Detail

$COMMIT

void $COMMIT(long timestamp)
Commit changes up to the given timestamp, but not including changes made at timestamp and afterward.

Parameters:
timestamp - The timestamp.

$GET$CHECKPOINT

Checkpoint $GET$CHECKPOINT()
Get the checkpoint object that monitors this rollbackable object.

Returns:
The checkpoint object.

$RESTORE

void $RESTORE(long timestamp,
              boolean trim)
Restore a previous state to all the private fields of this rollbackable object.

Parameters:
timestamp - The timestamp taken at the time when the previous state was recorded.
trim - Whether to delete the records used for the rollback.
See Also:
Checkpoint.rollback(long, boolean)

$SET$CHECKPOINT

java.lang.Object $SET$CHECKPOINT(Checkpoint checkpoint)
Set the checkpoint object of this rollbackable object. A merge operation is performed on the current checkpoint object and the new checkpoint object, so that the two checkpoint objects monitor the same set of objects when this function returns.

Parameters:
checkpoint - The new checkpoint object.
Returns:
This rollbackable object itself.
See Also:
Checkpoint.setCheckpoint(Checkpoint)