rice.pastry
Class NodeId

java.lang.Object
  extended byrice.pastry.Id
      extended byrice.pastry.NodeId
All Implemented Interfaces:
java.lang.Comparable, Id, java.io.Serializable

public class NodeId
extends Id

Represents a Pastry identifier for a node.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class rice.pastry.Id
Id.Distance
 
Field Summary
static int nodeIdBitLength
          This is the bit length of the node ids.
 
Fields inherited from class rice.pastry.Id
Half, IdBitLength, NegOne, Null, One
 
Constructor Summary
NodeId()
          Constructor.
NodeId(byte[] material)
          Constructor.
NodeId(int[] material)
          Constructor.
 
Methods inherited from class rice.pastry.Id
add, addToId, blit, checkBit, clockwise, clockwise, compareTo, copy, distance, distanceFromId, equals, equals, getAlternateId, getCCW, getCW, getDigit, getDomainPrefix, hashCode, indexOfMSDB, indexOfMSDD, isBetween, isBetween, longDistance, longDistanceFromId, makeRandomId, numDigits, setBit, setDigit, toByteArray, toString, toStringFull, xor
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

nodeIdBitLength

public static final int nodeIdBitLength
This is the bit length of the node ids. If it is n, then there are 2^n different Pastry nodes. We currently assume that it is divisible by 32.

See Also:
Constant Field Values
Constructor Detail

NodeId

public NodeId(byte[] material)
Constructor.

Parameters:
material - an array of length at least IdBitLength/8 containing raw Id material.

NodeId

public NodeId(int[] material)
Constructor.

Parameters:
material - an array of length at least IdBitLength/32 containing raw Id material.

NodeId

public NodeId()
Constructor. It constructs a new Id with a value of 0 for all bits.






Imprint-Dataprotection