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

Quick Search    Search Deep

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

All Known Implementing Classes:
BoundedChordIdentifier.MyFactory

public interface ChordIdentifierFactory

Specifies a factory interface to construct chord identifiers in various ways.


Method Summary
 ChordIdentifier createIdentifier(java.lang.Object o)
          Creates a chord identifier based on a Java object.
 ChordIdentifier createRandomIdentifier()
          Generates a random chord identifier.
 int getFingerTableSize()
          Returns the recommended size of the finger table.
 ChordIdentifier getIdentifier(java.net.URI uri)
          Returns the identifier specified by a given URI.
 

Method Detail

createIdentifier

public ChordIdentifier createIdentifier(java.lang.Object o)
Creates a chord identifier based on a Java object. Most implementations will require that the object's hashCode method is well-defined, however this is not a strict requirement, particularly if a 32-bit hash space is not sufficient.


getIdentifier

public ChordIdentifier getIdentifier(java.net.URI uri)
Returns the identifier specified by a given URI. Generally the identifier will be contained in the path component of the URI, but this is ultimately implementation-specific.


createRandomIdentifier

public ChordIdentifier createRandomIdentifier()
Generates a random chord identifier.


getFingerTableSize

public int getFingerTableSize()
Returns the recommended size of the finger table. This should be a value that ensures O(log n) searches throughout the identifier space.