Rice Pastry API

rice.pastry
Class NodeId

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

public class NodeId
extends Id

Represents a Pastry identifier for a node.

Version:
$Id: NodeId.java,v 1.22 2003/04/12 21:27:47 druschel Exp $
Author:
Peter Druschel
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.


Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection