ostore.archive
Class GenerateFragsReqMsg

java.lang.Object
  |
  +--dd.api.DDRouteMsg
        |
        +--dd.api.DDMacRouteMsg
              |
              +--ostore.archive.GenerateFragsReqMsg
All Implemented Interfaces:
QueueElementIF, QuickSerializable

public class GenerateFragsReqMsg
extends DDMacRouteMsg

GenerateFragsReqMsg is an event class that generates Fragments for a version of an object or checkpoints the version.

USAGE

The required field are thisRootBlock (CacheableIdentity of root block), numFragments (number of Fragments generated for block), inverseRate (inverse rate of encoding), erasureType (code for the type of erasure code to use).

NOTE: for copy-on-write only the blocks with null GUID's will be fragmented (archived).

Version:
$Id: GenerateFragsReqMsg.java,v 1.13 2004/05/13 20:13:06 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
GenerateFragsChkptResp, GenerateFragsReqMsg, Fragment, Erasure

Field Summary
 
Fields inherited from class dd.api.DDRouteMsg
dd_intermediate_upcall, hopCount, inbound, one_hop, peer, recursive_route, TTL
 
Constructor Summary
GenerateFragsReqMsg()
          Constructor: Initializes instance variables to null.
GenerateFragsReqMsg(InputBuffer buffer)
          Constructs a GenerateFragsReqMsg from its serialized form.
GenerateFragsReqMsg(SecureHash archiverGuid, GenerateFragsChkptReq req, SecureHash identifier, SecureHash aguid, Selection sel, Map blocks, boolean recursive, boolean dd_intermediate_upcall, boolean one_hop)
          Constructor.
 
Method Summary
 SecureHash getAguid()
          getAguid returns the A-GUID of the object.
 SortedMap getBlocks()
          getBlocks returns the SortedMap that contains the slice of the object.
 SecureHash getIdentifier()
          getIdentifier returns the unique id of node (i.e. nodeGuid) or app (e.g.
 GenerateFragsChkptReq getReq()
          getReq returns the GenerateFragsChkptReq
 Selection getSelection()
          getSelection returns the portion of DataObject to create Fragments for.
 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
 

Constructor Detail

GenerateFragsReqMsg

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


GenerateFragsReqMsg

public GenerateFragsReqMsg(SecureHash archiverGuid,
                           GenerateFragsChkptReq req,
                           SecureHash identifier,
                           SecureHash aguid,
                           Selection sel,
                           Map blocks,
                           boolean recursive,
                           boolean dd_intermediate_upcall,
                           boolean one_hop)
Constructor. Initializes the data in this GenerateFragsReqMsg.

Parameters:
req - GenerateFragsChkptReq
identifier - unique id of node (i.e. nodeGuid) or app (e.g. SHA1Hash(AppId + nodeGuid) requesting service from the ArchiverStage.
aguid - A-GUID of object.
sel - portion of DataObject to create Fragments for.
blocks - Map that contains slice of a object.

GenerateFragsReqMsg

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

Parameters:
buffer - serialized form of object.
Method Detail

getReq

public GenerateFragsChkptReq getReq()
getReq returns the GenerateFragsChkptReq

Returns:
GenerateFragsChkptReq

getIdentifier

public SecureHash getIdentifier()
getIdentifier returns the unique id of node (i.e. nodeGuid) or app (e.g. SHA1Hash(AppId + nodeGuid) requesting service from the ArchiverStage.

Returns:
the unique id of node (i.e. nodeGuid) or app (e.g. SHA1Hash(AppId + nodeGuid) requesting service from the ArchiverStage.

getAguid

public SecureHash getAguid()
getAguid returns the A-GUID of the object.

Returns:
A-GUID of object.

getSelection

public Selection getSelection()
getSelection returns the portion of DataObject to create Fragments for.

Returns:
portion of DataObject to create Fragments for.

getBlocks

public SortedMap getBlocks()
getBlocks returns the SortedMap that contains the slice of the object.

Returns:
Map that contains slice of a object.

serialize

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

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

toString

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

Overrides:
toString in class Object