ostore.replica
Class ReplicaOpenResp

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

public class ReplicaOpenResp
extends ReplicaResp

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

Version:
$Id: ReplicaOpenResp.java,v 1.16 2002/07/29 18:48:54 geels Exp $
Author:
Dennis Geels

Field Summary
protected  Heartbeat hb
          The most recent available Heartbeat for the replica.
 
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
ReplicaOpenResp(InputBuffer buffer)
          Constructs a ReplicaOpenResp from its serialized form.
ReplicaOpenResp(ReplicaOpenReq req, Heartbeat hb)
          Constructs a new (successful) ReplicaOpenResp.
ReplicaOpenResp(ReplicaOpenReq req, int error_code)
          Constructs a new (failed) ReplicaOpenResp.
 
Method Summary
 Heartbeat get_hb()
          Returns the most recent available Heartbeat for the replica (null if request was unsuccessful).
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 
Methods inherited from class ostore.replica.ReplicaResp
get_digest, get_error_code, get_req_digest, get_target, hashCode, is_local, successful, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

hb

protected Heartbeat hb
The most recent available Heartbeat for the replica.

Constructor Detail

ReplicaOpenResp

public ReplicaOpenResp(ReplicaOpenReq req,
                       Heartbeat hb)
Constructs a new (successful) ReplicaOpenResp.


ReplicaOpenResp

public ReplicaOpenResp(ReplicaOpenReq req,
                       int error_code)
Constructs a new (failed) ReplicaOpenResp.


ReplicaOpenResp

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

Method Detail

get_hb

public Heartbeat get_hb()
Returns the most recent available Heartbeat for the replica (null if request was unsuccessful).


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 ReplicaResp
Parameters:
buffer - the output buffer to add the object to