dd.ptr.api
Class PublishInfo

java.lang.Object
  |
  +--dd.ptr.api.PublishInfo
All Implemented Interfaces:
Comparable, QuickSerializable

public class PublishInfo
extends Object
implements Comparable, QuickSerializable

PublishInfo.java The class that encapsulates metadata about a particular replica of an object. The primary info of note is the GUID of its current location, but PublishInfo also keeps track of the distance to this replica, the lasthop taken to get here, and the level of the next hop on the publication path.

Version:
$Id: PublishInfo.java,v 1.2 2004/05/02 16:28:13 hweather Exp $
Author:
Ben Y. Zhao

Field Summary
 long distance
          The distance in ms to this replica's location
 NodeId lasthop
          The NodeId of the last hop traversed on the publication path.
 SecureHash src
          The GUID of this replica's location
 DDTag tag
           
 
Constructor Summary
PublishInfo(InputBuffer buffer)
           
PublishInfo(SecureHash src, DDTag tag, NodeId lasthop)
          The routing level that we exit this node at, on the publication path.
PublishInfo(SecureHash src, long distance, DDTag tag, NodeId lasthop)
           
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object other)
          Don't look at distance.
 int hashCode()
          Don't look at distance.
 void serialize(OutputBuffer buffer)
           
 String toString()
          Returns a human-readable representation of this PublishInfo.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

src

public SecureHash src
The GUID of this replica's location


distance

public long distance
The distance in ms to this replica's location


tag

public DDTag tag

lasthop

public NodeId lasthop
The NodeId of the last hop traversed on the publication path.

Constructor Detail

PublishInfo

public PublishInfo(SecureHash src,
                   DDTag tag,
                   NodeId lasthop)
The routing level that we exit this node at, on the publication path. Using an index starting with 0. If this node is the root, the value is set to -1.


PublishInfo

public PublishInfo(SecureHash src,
                   long distance,
                   DDTag tag,
                   NodeId lasthop)

PublishInfo

public PublishInfo(InputBuffer buffer)
            throws QSException
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Specified by:
serialize in interface QuickSerializable

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

equals

public boolean equals(Object other)
Don't look at distance.

Overrides:
equals in class Object

hashCode

public int hashCode()
Don't look at distance.

Overrides:
hashCode in class Object

toString

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

Overrides:
toString in class Object