Rice Pastry API

rice.pastry.multiring
Class RingNodeId

java.lang.Object
  |
  +--rice.pastry.Id
        |
        +--rice.pastry.NodeId
              |
              +--rice.pastry.multiring.RingNodeId
All Implemented Interfaces:
java.lang.Comparable, Id, java.io.Serializable

public class RingNodeId
extends NodeId

This class represents a nodeId, combined with a ring-identfying Id. This class is designed to be backwards-compatible with other applications, as all normal methods do what they would before. Applications can use the getRingId() methods in order to manipulate the ring identifier.

Version:
$Id: RingNodeId.java,v 1.3 2003/03/20 10:13:13 amislove Exp $
Author:
Alan Mislove
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class rice.pastry.Id
Id.Distance
 
Field Summary
 
Fields inherited from class rice.pastry.NodeId
nodeIdBitLength
 
Fields inherited from class rice.pastry.Id
Half, IdBitLength, NegOne, Null, One
 
Constructor Summary
RingNodeId(byte[] material, rice.pastry.multiring.RingId ringId)
           
RingNodeId(int[] material, rice.pastry.multiring.RingId ringId)
           
RingNodeId(rice.pastry.NodeId nodeId, rice.pastry.multiring.RingId ringId)
           
RingNodeId(rice.pastry.multiring.RingId ringId)
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Equality operator for Ids.
 rice.pastry.multiring.RingId getRingId()
           
 int hashCode()
          Hash codes for Ids.
 void setRingId(rice.pastry.multiring.RingId ringId)
           
 java.lang.String toString()
          Returns a string representation of the Id in base 16.
 
Methods inherited from class rice.pastry.Id
add, addToId, blit, checkBit, clockwise, clockwise, compareTo, copy, distance, distanceFromId, equals, getAlternateId, getCCW, getCW, getDigit, getDomainPrefix, indexOfMSDB, indexOfMSDD, isBetween, isBetween, longDistance, longDistanceFromId, makeRandomId, numDigits, setBit, setDigit, toByteArray, toStringFull, xor
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RingNodeId

public RingNodeId(byte[] material,
                  rice.pastry.multiring.RingId ringId)

RingNodeId

public RingNodeId(int[] material,
                  rice.pastry.multiring.RingId ringId)

RingNodeId

public RingNodeId(rice.pastry.NodeId nodeId,
                  rice.pastry.multiring.RingId ringId)

RingNodeId

public RingNodeId(rice.pastry.multiring.RingId ringId)
Method Detail

getRingId

public rice.pastry.multiring.RingId getRingId()

setRingId

public void setRingId(rice.pastry.multiring.RingId ringId)

hashCode

public int hashCode()
Description copied from class: Id
Hash codes for Ids.

Overrides:
hashCode in class Id
Returns:
a hash code.

equals

public boolean equals(java.lang.Object o)
Description copied from class: Id
Equality operator for Ids.

Overrides:
equals in class Id
Parameters:
o - a Id object
Returns:
true if they are equal, false otherwise.

toString

public java.lang.String toString()
Description copied from class: Id
Returns a string representation of the Id in base 16. The string is a byte string from most to least significant.

Overrides:
toString in class Id
Returns:
A String representation of this Id, abbreviated

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection