com.kedwards.swt.persist
Interface Checkpointed

All Known Subinterfaces:
ServiceBackend
All Known Implementing Classes:
ServiceWrapper, UnicastServiceBackend

public interface Checkpointed

Checkpointed.java

Things that can be checkpointed implement this interface.

See http://www.kedwards.com/jini

No warranty expressed or implied; use at your own risk; for educational purposes only.

Author:
Keith Edwards

Method Summary
 void getCheckpointData(TaggedPersistentData data)
          This method is called whenever a checkpoint is in progress, to collect the data to be checkpointed from all checkpointable entities.
 void setCheckpointData(TaggedPersistentData data)
          This method is called whenever a restore is in progress, to notify all the restorable entities of the recovered data.
 

Method Detail

getCheckpointData

public void getCheckpointData(TaggedPersistentData data)
                       throws java.io.IOException
This method is called whenever a checkpoint is in progress, to collect the data to be checkpointed from all checkpointable entities. Checkpointed entities should add the data they want to be checkpointed into the Tagged PersistendData argument. By convention, they should add the data using a name prefixed by their classname.
Parameters:
data - The datastructure to which data to be checkpointed should be added.

setCheckpointData

public void setCheckpointData(TaggedPersistentData data)
                       throws java.io.IOException,
                              java.lang.ClassNotFoundException
This method is called whenever a restore is in progress, to notify all the restorable entities of the recovered data. Restorable entities should extract the data they are recovering from the Tagged PersistendData argument. By convention, they should read the data using a name prefixed by their classname.
Parameters:
data - The datastructure from which data to be recovered should be extracted.