ostore.tapestry.impl
Class PublishInfo

java.lang.Object
  |
  +--ostore.tapestry.impl.PublishInfo
All Implemented Interfaces:
Comparable, QuickSerializable

public class PublishInfo
extends Object
implements Comparable, QuickSerializable


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
 TapestryTag tag
           
 
Constructor Summary
PublishInfo(InputBuffer buffer)
           
PublishInfo(SecureHash src, long distance, TapestryTag tag, NodeId lasthop)
           
PublishInfo(SecureHash src, TapestryTag tag, NodeId lasthop)
          The routing level that we exit this node at, on the publication path.
 
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)
          Add the object to the 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 TapestryTag tag

lasthop

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

PublishInfo

public PublishInfo(SecureHash src,
                   TapestryTag 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,
                   TapestryTag tag,
                   NodeId lasthop)

PublishInfo

public PublishInfo(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
Following copied from interface: ostore.util.QuickSerializable
Parameters:
buffer - the output buffer to add the object to

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