ostore.archive.events
Class GenerateFragsBlkReq

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

public class GenerateFragsBlkReq
extends Object
implements QueueElementIF, QuickSerializable

GenerateFragsBlkReq is an event class that generates Fragments for a block.

USAGE

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

Version:
$Id: GenerateFragsBlkReq.java,v 1.20 2004/03/23 03:00:46 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
GenerateFragsBlkResp, GenerateFragsChkptReq, Fragment, Erasure

Field Summary
 CacheableIdentity blockId
          blockId == CacheableIdentity of block.
 int blockSize
          blockSize stores all the block size of each block, except the topblock can be larger or smaller.
 int erasureType
          erasureType == code for the type of erasure code to use.
 CacheablePinned handle
          handle to block itself
 int inverseRate
          inverseRate == rate of encoding.
 int numFragments
          numFragments == number of fragments generated for block.
 CacheableIdentity parentBlockId
          parentBlockId == CacheableIdentity of parent block.
 SinkIF sink
          Requestor sink to use to return the response.
 Object userData
          Requestor defined object to be returned in the response.
 
Constructor Summary
GenerateFragsBlkReq()
          Constructor: Initializes instance variables to null.
GenerateFragsBlkReq(CacheableIdentity id, int numFrags, int inverseR, int erasureT, int bSize, CacheableIdentity parentId, CacheablePinned handle, Object userData, SinkIF sink)
          Constructor.
GenerateFragsBlkReq(InputBuffer buffer)
          Constructs a GenerateFragsBlkReq 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

blockId

public CacheableIdentity blockId
blockId == CacheableIdentity of block.


numFragments

public int numFragments
numFragments == number of fragments generated for block.


inverseRate

public int inverseRate
inverseRate == rate of encoding.


erasureType

public int erasureType
erasureType == code for the type of erasure code to use. i.e. Cauchy.ENCODETYPE, Interleaved.ENCODETYPE


blockSize

public int blockSize
blockSize stores all the block size of each block, except the topblock can be larger or smaller. This piece of information is either retrieved from the version metadata on archive or from a fragment on reconstruct.


parentBlockId

public CacheableIdentity parentBlockId
parentBlockId == CacheableIdentity of parent block.


handle

public CacheablePinned handle
handle to block itself


userData

public Object userData
Requestor defined object to be returned in the response.


sink

public SinkIF sink
Requestor sink to use to return the response.

Constructor Detail

GenerateFragsBlkReq

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


GenerateFragsBlkReq

public GenerateFragsBlkReq(CacheableIdentity id,
                           int numFrags,
                           int inverseR,
                           int erasureT,
                           int bSize,
                           CacheableIdentity parentId,
                           CacheablePinned handle,
                           Object userData,
                           SinkIF sink)
Constructor. Initializes the data in this GenerateFragsBlkReq.

Parameters:
id - cacheable identity of block.
numFrags - number of fragments generated for block.
inverseR - rate of encoding.
erasureT - code for the type of erasure code to use.
bSize - size of block in bytes.
parentId - CacheableIdentity for parent block
handle - handle of parent block.
userData - Requestor defined object to be returned with response.
sink - Requestor sink to return resp.

GenerateFragsBlkReq

public GenerateFragsBlkReq(InputBuffer buffer)
                    throws QSException
Constructs a GenerateFragsBlkReq 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