ostore.read
Class ReplicaBytesReadResp

java.lang.Object
  |
  +--ostore.replica.ReplicaResp
        |
        +--ostore.read.ReplicaReadResp
              |
              +--ostore.read.ReplicaBytesReadResp
All Implemented Interfaces:
QueueElementIF, QuickSerializable

public class ReplicaBytesReadResp
extends ReplicaReadResp

Events sent from the ReplicaStage to the ClientStage responding to ReplicaBytesReadReq events.

Version:
$Id: ReplicaBytesReadResp.java,v 1.16 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.ReplicaReadResp
missing, read, version
 
Fields inherited from class ostore.replica.ReplicaResp
digest, error_code, local, NO_ERROR, NOT_OPEN, OBJECT_NOT_FOUND, READ_ERROR, req_digest, target, VERSION_PREDICATE_NOT_SATISFIED
 
Constructor Summary
ReplicaBytesReadResp(InputBuffer buffer)
          Constructs a ReplicaBytesReadResp from its serialized form.
ReplicaBytesReadResp(ReplicaReadReq req, int error_code)
          Constructs a new (failed) ReplicaBytesReadResp.
ReplicaBytesReadResp(ReplicaReadReq req, VID version, Selection read, Selection missing, byte[][] data)
          Constructs a new (successful) ReplicaBytesReadResp.
 
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.ReplicaReadResp
get_missing, get_read, get_version, toString
 
Methods inherited from class ostore.replica.ReplicaResp
get_digest, get_error_code, get_req_digest, get_target, hashCode, is_local, successful
 
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

ReplicaBytesReadResp

public ReplicaBytesReadResp(ReplicaReadReq req,
                            VID version,
                            Selection read,
                            Selection missing,
                            byte[][] data)
Constructs a new (successful) ReplicaBytesReadResp.


ReplicaBytesReadResp

public ReplicaBytesReadResp(ReplicaReadReq req,
                            int error_code)
Constructs a new (failed) ReplicaBytesReadResp.


ReplicaBytesReadResp

public ReplicaBytesReadResp(InputBuffer buffer)
                     throws QSException
Constructs a ReplicaBytesReadResp 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 ReplicaReadResp
Parameters:
buffer - the output buffer to add the object to