ostore.archive.events
Class GenerateFragsChkptResp

java.lang.Object
  |
  +--ostore.archive.events.GenerateFragsChkptResp
All Implemented Interfaces:
QueueElementIF, QuickSerializable

public class GenerateFragsChkptResp
extends Object
implements QueueElementIF, QuickSerializable

GenerateFragsChkptResp is an event class that responds to a GenerateFragsChkptReq with the CacheableIdentity of the root block that has been checkpointed (i.e. fragments for a version of an object has been produced).

USAGE

The required field are thisRootBlock (CacheableIdentity of root block), vGuid (Resulting V-GUID for checkpointing version.

Version:
$Id: GenerateFragsChkptResp.java,v 1.16 2003/02/07 20:38:14 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
GenerateFragsChkptReq, GenerateFragsChkptReq, Fragment, Erasure

Field Summary
 SortedMap blockIds
          A VHASH->FHASH SortedMap containing the blockIds(vhashes) that make up the slice of a of modified and Fragmented blocks of an object, or null.
 CacheableIdentity thisRootBlock
          thisRootBlock == CacheableIdentity of root block.
 SecureHash vGuid
          vGuid == Resulting guid for fragmentation of checkpoint.
 
Constructor Summary
GenerateFragsChkptResp()
          Constructor: Initializes instance variables to null.
GenerateFragsChkptResp(CacheableIdentity rootBlock, SecureHash v_guid, Map blockIdentifiers)
          Constructor.
GenerateFragsChkptResp(InputBuffer buffer)
          Constructs a GenerateFragsChkptResp from its serialized form.
 
Method Summary
 void serialize(OutputBuffer buffer)
          Specified by ostore.util.QuickSerializable
 String toString()
          Specified by java.lang.Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

thisRootBlock

public CacheableIdentity thisRootBlock
thisRootBlock == CacheableIdentity of root block.


vGuid

public SecureHash vGuid
vGuid == Resulting guid for fragmentation of checkpoint.


blockIds

public SortedMap blockIds
A VHASH->FHASH SortedMap containing the blockIds(vhashes) that make up the slice of a of modified and Fragmented blocks of an object, or null.

The hashCode of responses depend on their digest. Therefore we keep this map sorted, to ensure a deterministic serialization.

Constructor Detail

GenerateFragsChkptResp

public GenerateFragsChkptResp()
Constructor: Initializes instance variables to null.


GenerateFragsChkptResp

public GenerateFragsChkptResp(CacheableIdentity rootBlock,
                              SecureHash v_guid,
                              Map blockIdentifiers)
Constructor. Initializes the data in this GenerateFragsChkptResp.

Parameters:
rootBlock - cacheable identity of root block.
v_guid - resulting guid fro fragmentation of checkpoint.
blockIdentifiers - A VHASH->FHASH Map containing the blockIds(vhashes) that make up the slice of the of modified and Fragmented blocks of an object, or null.

GenerateFragsChkptResp

public GenerateFragsChkptResp(InputBuffer buffer)
                       throws QSException
Constructs a GenerateFragsChkptResp from its serialized form.

Parameters:
buffer - serialized form of object.
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerializable

Specified by:
serialize in interface QuickSerializable
Parameters:
buffer - the output buffer to add the object to

toString

public String toString()
Specified by java.lang.Object

Overrides:
toString in class Object