ostore.client
Class OSCreateObjectResult

java.lang.Object
  |
  +--ostore.client.OSResult
        |
        +--ostore.client.OSCreateObjectResult
All Implemented Interfaces:
QueueElementIF, QuickSerializable

public class OSCreateObjectResult
extends OSResult
implements QueueElementIF

The OSCreateObjectResult reports the outcome of an OSCreateObjectRequest. The ClientStage constructs an OSCreateObjectResult by translating OceanStore's internal result.

Version:
$Id: OSCreateObjectResult.java,v 1.25 2004/02/13 23:14:42 rrubin Exp $
Author:
Patrick R. Eaton
See Also:
OSCreateObjectRequest

Field Summary
static byte REASON_DUP_GUID
           
static byte REASON_SUCCESS
           
static byte REASON_TIMEOUT
           
 
Fields inherited from class ostore.client.OSResult
app_id
 
Constructor Summary
OSCreateObjectResult(InputBuffer buffer)
           
 
Method Summary
 SecureHash getAguid()
          Returns the Aguid of the new data object.
 SecureHash getIRGuid()
          Returns the guid that identifies the inner ring that is maintaining the new data object.
 byte getReason()
          Returns a non-success reason code is getSuccess() is false.
 boolean getSuccess()
          Returns true if the object was successfully created; returns false otherwise.
 SecureHash getVguid()
          Returns the Vguid of the first version of the new data object.
 SecureHash getVhash()
          Returns the Vhash of the first version of the new data object.
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
           
 
Methods inherited from class ostore.client.OSResult
getAppId, getReqSeqNum, getUserTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REASON_SUCCESS

public static final byte REASON_SUCCESS
See Also:
Constant Field Values

REASON_DUP_GUID

public static final byte REASON_DUP_GUID
See Also:
Constant Field Values

REASON_TIMEOUT

public static final byte REASON_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

OSCreateObjectResult

public OSCreateObjectResult(InputBuffer buffer)
                     throws QSException
Method Detail

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

getSuccess

public boolean getSuccess()
Returns true if the object was successfully created; returns false otherwise.

Returns:
true if the object was successfully created; returns false otherwise.

getReason

public byte getReason()
Returns a non-success reason code is getSuccess() is false.

Returns:
Returns a non-success reason code is getSuccess() is false.

getAguid

public SecureHash getAguid()
Returns the Aguid of the new data object.

Returns:
the Aguid of the new data object

getVguid

public SecureHash getVguid()
Returns the Vguid of the first version of the new data object.

Returns:
the Vguid of the first version of the data object. May be null.

getVhash

public SecureHash getVhash()
Returns the Vhash of the first version of the new data object.

Returns:
the Vhash of the first version of the data object

getIRGuid

public SecureHash getIRGuid()
Returns the guid that identifies the inner ring that is maintaining the new data object.

Returns:
the guid of the inner ring for the data object

toString

public String toString()
Overrides:
toString in class Object