ePOST API

rice.pastry
Class NodeId

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

public class NodeId
extends Id

Represents a Pastry identifier for a node.

Version:
$Id: NodeId.java 2302 2005-03-11 00:58:26Z jeffh $
Author:
Peter Druschel, Alan Mislove
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces 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, nlen, Null, One
 
Method Summary
static NodeId buildNodeId()
          Constructor.
static NodeId buildNodeId(byte[] material)
          Constructor.
static NodeId buildNodeId(int[] material)
          Constructor.
 
Methods inherited from class rice.pastry.Id
add, addToId, blit, blit, build, build, build, build, build, checkBit, clockwise, clockwise, compareTo, copy, distance, distance, distanceFromId, equals, equals, getAlternateId, getByteArrayLength, getCCW, getCW, getDigit, getDomainPrefix, hashCode, indexOfMSDB, indexOfMSDD, isBetween, isBetween, longDistance, longDistanceFromId, makeRandomId, makeRandomId, numDigits, resolve, toByteArray, toByteArray, toString, toStringBare, toStringFull, trans, trans, trans
 
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
Method Detail

buildNodeId

public static NodeId buildNodeId(int[] material)
Constructor.

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

buildNodeId

public static NodeId buildNodeId(byte[] material)
Constructor.

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

buildNodeId

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


ePOST API

Copyright © 2001-2005 - Rice Pastry.