ostore.archive.events
Class GenerateFragsChkptReq

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

public class GenerateFragsChkptReq
extends Object
implements QueueElementIF, QuickSerializable

GenerateFragsChkptReq 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: GenerateFragsChkptReq.java,v 1.18 2003/11/17 23:52:43 emilong Exp $
Author:
Hakim Weatherspoon
See Also:
GenerateFragsChkptResp, GenerateFragsChkptReq, Fragment, Erasure

Field Summary
 int erasureType
          erasureType == code for the type of erasure code to use.
 HandleStore handleStore
          HandleStore of VerifiableBlocks to Fragment.
 int inverseRate
          inverseRate == rate of encoding.
 int numFragments
          numFragments == number of fragments generated for block.
 CacheableIdentity thisRootBlock
          thisRootBlock == CacheableIdentity of root block.
 
Constructor Summary
GenerateFragsChkptReq()
          Constructor: Initializes instance variables to null.
GenerateFragsChkptReq(CacheableIdentity rootBlock, int numFrags, int inverseR, int erasureT)
          Constructor.
GenerateFragsChkptReq(CacheableIdentity rootBlock, int numFrags, int inverseR, int erasureT, HandleStore store)
          Constructor.
GenerateFragsChkptReq(InputBuffer buffer)
          Constructs a GenerateFragsChkptReq from its serialized form.
 
Method Summary
 HandleStore getHandleStore()
          getHandleStore returns the HandleStore of VerifiableBlocks to Fragment.
 void serialize(OutputBuffer buffer)
          Specified by ostore.util.QuickSerializable
 void setHandleStore(HandleStore store)
          setHandleStore sets the HandleStore belonging to the VerifiableBlocks to Fragment.
 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.


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.


handleStore

public HandleStore handleStore
HandleStore of VerifiableBlocks to Fragment.

Constructor Detail

GenerateFragsChkptReq

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


GenerateFragsChkptReq

public GenerateFragsChkptReq(CacheableIdentity rootBlock,
                             int numFrags,
                             int inverseR,
                             int erasureT)
Constructor. Initializes the data in this GenerateFragsChkptReq.

Parameters:
rootBlock - = cacheable identity of root block.
numFrags - = number of fragments generated for block.
inverseR - = rate of encoding.
erasureT - = code for the type of erasure code to use.

GenerateFragsChkptReq

public GenerateFragsChkptReq(CacheableIdentity rootBlock,
                             int numFrags,
                             int inverseR,
                             int erasureT,
                             HandleStore store)
Constructor. Initializes the data in this GenerateFragsChkptReq.

Parameters:
rootBlock - cacheable identity of root block.
numFrags - number of fragments generated for block.
inverseR - rate of encoding.
erasureT - code for the type of erasure code to use.
store - sets the HandleStore belonging to the VerifiableBlocks to Fragment.

GenerateFragsChkptReq

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

Parameters:
buffer - serialized form of object.
Method Detail

getHandleStore

public HandleStore getHandleStore()
getHandleStore returns the HandleStore of VerifiableBlocks to Fragment.

Returns:
the HandleStore of VerifiableBlocks to Fragment.

setHandleStore

public void setHandleStore(HandleStore store)
setHandleStore sets the HandleStore belonging to the VerifiableBlocks to Fragment.

Parameters:
store - the HandleStore belonging to the VerifiableBlocks to Fragment.

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