ostore.read
Class BytesReadResp

java.lang.Object
  |
  +--ostore.read.ReadResp
        |
        +--ostore.read.BytesReadResp
All Implemented Interfaces:
QueueElementIF, QuickSerializable

public class BytesReadResp
extends ReadResp

Events sent from the ReadStage to the ReplicaStage responding to BytesReadReq events.

Version:
$Id: BytesReadResp.java,v 1.13 2002/07/29 18:48:53 geels Exp $
Author:
Dennis Geels

Field Summary
protected  byte[][] data
          The bytes read, or null.
 
Fields inherited from class ostore.read.ReadResp
digest, error_code, missing, NO_ERROR, read, READ_ERROR, req_digest
 
Constructor Summary
BytesReadResp(InputBuffer buffer)
          Constructs a BytesReadResp from its serialized form.
BytesReadResp(ReadReq req, int error_code)
          Constructs a new (failed) BytesReadResp.
BytesReadResp(ReadReq req, Selection read, Selection missing, byte[][] data)
          Constructs a new (successful) BytesReadResp.
 
Method Summary
 byte[][] get_data()
          Returns the bytes read.
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 
Methods inherited from class ostore.read.ReadResp
get_digest, get_error_code, get_missing, get_read, get_req_digest, get_req_seq_num, hashCode, successful, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

data

protected byte[][] data
The bytes read, or null.

. If not null, each sub array contains the data for one sub-Selection of read, in order.

data != null iff this.successful().

Constructor Detail

BytesReadResp

public BytesReadResp(ReadReq req,
                     Selection read,
                     Selection missing,
                     byte[][] data)
Constructs a new (successful) BytesReadResp.


BytesReadResp

public BytesReadResp(ReadReq req,
                     int error_code)
Constructs a new (failed) BytesReadResp.


BytesReadResp

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

Method Detail

get_data

public byte[][] get_data()
Returns the bytes read.


serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

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