Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.ubermq.chord
Interface ChordIdentifier  view ChordIdentifier download ChordIdentifier.java

All Superinterfaces:
java.lang.Comparable, java.io.Serializable
All Known Implementing Classes:
BoundedChordIdentifier, IntegerChordIdentifier

public interface ChordIdentifier
extends java.lang.Comparable, java.io.Serializable

A chord identifier. Chord identifiers are numeric, have a natural ordering, and exist in a finite key space (corresponding to the size of the hashing function being used).

Conceptually, identifiers are placed on an identifier circle, which provides a graphical representation of successor and predecessor nodes.


Method Summary
 ChordIdentifierFactory factory()
          Provides the factory instance used to create this identifier, so that new identifiers can be easily created from existing ones.
 ChordIdentifier next()
          Returns the next chord identifier in the identifier sequence.
 ChordIdentifier next(long l)
          Returns the chord identifier that is l after this one.
 ChordIdentifier nextFinger(int i)
          Returns the identifier for the ith finger for this identifier.
 double normal()
          Returns the normalized representation of this identifier relative to other identifiers.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

normal

public double normal()
Returns the normalized representation of this identifier relative to other identifiers. The returned value will be in the interval (0,1).


next

public ChordIdentifier next()
Returns the next chord identifier in the identifier sequence.


next

public ChordIdentifier next(long l)
Returns the chord identifier that is l after this one. This may be a negative number to go backwards.


nextFinger

public ChordIdentifier nextFinger(int i)
Returns the identifier for the ith finger for this identifier. A finger is defined by the Chord set of algorithms as the identifier that succeeds this identifier by 2i. However, individual identifiers can use other finger computations, as appropriate.


factory

public ChordIdentifierFactory factory()
Provides the factory instance used to create this identifier, so that new identifiers can be easily created from existing ones.