ostore.dtree
Class DTreeReq

java.lang.Object
  |
  +--ostore.dtree.DTreeReq
All Implemented Interfaces:
QueueElementIF, QuickSerializable
Direct Known Subclasses:
CreateTreeReq, DTreeServiceReq, JoinTreeReq, LeaveTreeReq

public abstract class DTreeReq
extends Object
implements QueueElementIF, QuickSerializable

A superclass of all requests handled by the DTreeNode.

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

Field Summary
protected  SecureHash digest
          The digest of this DTreeReq.
protected  SecureHash tree_id
          The name of the dissemination tree on which to operate.
 
Constructor Summary
DTreeReq(InputBuffer buffer)
          Constructs a DTreeReq from its serialized form.
DTreeReq(SecureHash tree_id)
          Creates a new DTreeReq for the specified tree.
 
Method Summary
 SecureHash get_digest()
          Returns the digest of this DTreeReq.
 long get_seq_num()
          Returns the sequence number of the request.
 SecureHash get_tree_id()
          Returns the name of the dissemination tree on which to operate.
 int hashCode()
          Returns the hash of the digest of this DTreeReq.
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
          Returns a human-readable representation of this DTreeReq.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

tree_id

protected SecureHash tree_id
The name of the dissemination tree on which to operate. That GUID will usually (always?) be the A-GUID for a data object.


digest

protected transient SecureHash digest
The digest of this DTreeReq. Do NOT include this field in to_bytes.

Constructor Detail

DTreeReq

public DTreeReq(SecureHash tree_id)
Creates a new DTreeReq for the specified tree.


DTreeReq

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

Method Detail

get_seq_num

public long get_seq_num()
Returns the sequence number of the request.


get_tree_id

public SecureHash get_tree_id()
Returns the name of the dissemination tree on which to operate.


get_digest

public SecureHash get_digest()
Returns the digest of this DTreeReq.


serialize

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

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

hashCode

public int hashCode()
Returns the hash of the digest of this DTreeReq.

Overrides:
hashCode in class Object

toString

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

Overrides:
toString in class Object