ostore.archive
Class GenerateChkptStage

java.lang.Object
  |
  +--ostore.archive.GenerateChkptStage
All Implemented Interfaces:
EventHandlerIF, ProfilableIF, SingleThreadedEventHandlerIF

public class GenerateChkptStage
extends Object
implements SingleThreadedEventHandlerIF, EventHandlerIF, ProfilableIF

The GenerateChkptStage generates a checkpoint for a particular version. The result is a V-GUID or version GUID.

The GenerateChkptStage creates a checkpoint by sending a GenerateFragsBlkReq for each uniquely modified VerifiableBlock. When the checkpointing process is done, all uniquely modified VerifiableBlocks have been Erasure encoded into n Fragments and a BucketsToDisseminateEvent containing the resulting GUID's of all the uniquely modified VerifiableBlocks has been dispatched.

USAGE

To create a checkpoint dispatch a GenerateFragsChkptReq containing the CacheableIdentity (i.e. VHASH) of the top VerifiableBlock, the number of Fragments to Erasure encode, the inverse rate of encoding, and the Erasure code type. The local GenerateChkptStage will receive the checkpoint request message and return a GenerateFragsChkptResp that either includes the resulting V-GUID.

INITIALIZATION PARAMETERS

node_id
NodeId of the local server where this stage is running.
AlarmTimeout
Period to timeout (in milliseconds)

Version:
$Id: GenerateChkptStage.java,v 1.56 2004/05/13 20:13:06 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
GenerateFragsBlkReq, GenerateFragsBlkResp, GenerateFragsChkptReq, GenerateFragsChkptResp, BucketsToDisseminateEvent, Erasure, Disseminatable, Fragment, VerifiableBlock, DataObject, Btree.InteriorNode, DataObject.DataBlock

Constructor Summary
GenerateChkptStage()
           
 
Method Summary
 void destroy()
           
 void handleEvent(QueueElementIF item)
           
 void handleEvents(QueueElementIF[] items)
           
 void init(ConfigDataIF config)
           
 int profileSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenerateChkptStage

public GenerateChkptStage()
Method Detail

handleEvent

public void handleEvent(QueueElementIF item)
                 throws EventHandlerException
Specified by:
handleEvent in interface EventHandlerIF
EventHandlerException

handleEvents

public void handleEvents(QueueElementIF[] items)
                  throws EventHandlerException
Specified by:
handleEvents in interface EventHandlerIF
EventHandlerException

init

public void init(ConfigDataIF config)
          throws Exception
Specified by:
init in interface EventHandlerIF
Exception

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface EventHandlerIF
Exception

profileSize

public int profileSize()
Specified by:
profileSize in interface ProfilableIF