ostore.replica
Class ReplicaCreateResp

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

public class ReplicaCreateResp
extends ReplicaResp

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

Version:
$Id: ReplicaCreateResp.java,v 1.10 2002/07/20 22:19:35 srhea Exp $
Author:
Dennis Geels

Field Summary
protected  CreateObjectResp create_resp
          The result of the create, or null if the response is only tentative.
protected  SecureHash initial_vhash
          The VHASH of the intial version of the object.
 
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
ReplicaCreateResp(InputBuffer buffer)
          Constructs a ReplicaCreateResp from its serialized form.
ReplicaCreateResp(ReplicaCreateReq req, CreateObjectResp create_resp)
          Constructs a new (successful) ReplicaCreateResp.
ReplicaCreateResp(ReplicaCreateReq req, SecureHash initial_vhash)
          Constructs a new (successful) ReplicaCreateResp for a tentatively create object.
 
Method Summary
 CreateObjectResp get_create_resp()
          Returns the result of the create.
 SecureHash get_initial_vhash()
          Returns the VHASH of the intial version of the object.
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
          Returns a human-readable representation of this ReplicaCreateResp.
 
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

create_resp

protected CreateObjectResp create_resp
The result of the create, or null if the response is only tentative.


initial_vhash

protected SecureHash initial_vhash
The VHASH of the intial version of the object. In normal responses, this field is derived from create_resp. For tentative responses, this field is set and stored explicitly, because create_resp is null.

Constructor Detail

ReplicaCreateResp

public ReplicaCreateResp(ReplicaCreateReq req,
                         CreateObjectResp create_resp)
Constructs a new (successful) ReplicaCreateResp.


ReplicaCreateResp

public ReplicaCreateResp(ReplicaCreateReq req,
                         SecureHash initial_vhash)
Constructs a new (successful) ReplicaCreateResp for a tentatively create object.


ReplicaCreateResp

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

Method Detail

get_create_resp

public CreateObjectResp get_create_resp()
Returns the result of the create.


get_initial_vhash

public SecureHash get_initial_vhash()
Returns the VHASH of the intial version of the object.


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

toString

public String toString()
Returns a human-readable representation of this ReplicaCreateResp.

Overrides:
toString in class ReplicaResp