ostore.archive.events
Class ReconstructBlkResp

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

public class ReconstructBlkResp
extends Object
implements QueueElementIF, QuickSerializable

ReconstructBlkResp is an event class that responds to a ReconstructBlkReq once the block has been recoalesced.

USAGE

The required field are blockId (GUID of block to recoalesce), srcId (ID of stage that produced the response).

Version:
$Id: ReconstructBlkResp.java,v 1.20 2004/03/23 03:02:30 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
RecoalesceBlkReq, ReconstructBlkReq, RequestorStage, RecoalesceBlkStage

Field Summary
 CacheableIdentity blockId
          blockId == GUID of block recoalesced.
 Object userData
          Requestor defined object placed in the request and returned in the ReconstructBlkResp.
 
Constructor Summary
ReconstructBlkResp()
          Constructor: Initializes instance variables to null.
ReconstructBlkResp(CacheableIdentity newBlockId, CacheablePinned handle, Object userData)
          Constructor.
ReconstructBlkResp(InputBuffer buffer)
          Constructs a ReconstructBlkResp from its serialized form.
 
Method Summary
 CacheablePinned getHandle()
          getHandle returns the handle associated with the blockId.
 void serialize(OutputBuffer buffer)
          Specified by ostore.util.QuickSerializable
 void setHandle(CacheablePinned handle)
          setHandle sets the handle associated with the blockId.
 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 == GUID of block recoalesced.


userData

public Object userData
Requestor defined object placed in the request and returned in the ReconstructBlkResp.

Constructor Detail

ReconstructBlkResp

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


ReconstructBlkResp

public ReconstructBlkResp(CacheableIdentity newBlockId,
                          CacheablePinned handle,
                          Object userData)
Constructor. Initializes the data in this ReconstructBlkResp.

Parameters:
newBlockId - resulting guid from fragmentation of block.
handle - handle for new block.
userData - Requestor defined object returned with response.

ReconstructBlkResp

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

Parameters:
buffer - serialized form of object.
Method Detail

getHandle

public CacheablePinned getHandle()
getHandle returns the handle associated with the blockId.


setHandle

public void setHandle(CacheablePinned handle)
setHandle sets the handle associated with the blockId.


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