Rice Pastry API

rice.p2p.commonapi
Interface IdFactory

All Known Implementing Classes:
PastryIdFactory

public interface IdFactory

Version:
$Id: IdFactory.java,v 1.5 2003/09/28 08:16:29 amislove Exp $
Author:
Alan Mislove, Peter Druschel

Method Summary
 rice.p2p.commonapi.Id buildId(byte[] material)
          Builds a protocol-specific Id given the source data.
 rice.p2p.commonapi.Id buildId(int[] material)
          Builds a protocol-specific Id given the source data.
 rice.p2p.commonapi.Id buildId(java.lang.String string)
          Builds a protocol-specific Id by using the hash of the given string as source data.
 Id.Distance buildIdDistance(byte[] material)
          Builds a protocol-specific Id.Distance given the source data.
 rice.p2p.commonapi.IdRange buildIdRange(rice.p2p.commonapi.Id cw, rice.p2p.commonapi.Id ccw)
          Creates an IdRange given the CW and CCW ids.
 rice.p2p.commonapi.IdSet buildIdSet()
          Creates an empty IdSet.
 

Method Detail

buildId

public rice.p2p.commonapi.Id buildId(byte[] material)
Builds a protocol-specific Id given the source data.

Parameters:
material - The material to use
Returns:
The built Id.

buildId

public rice.p2p.commonapi.Id buildId(int[] material)
Builds a protocol-specific Id given the source data.

Parameters:
material - The material to use
Returns:
The built Id.

buildId

public rice.p2p.commonapi.Id buildId(java.lang.String string)
Builds a protocol-specific Id by using the hash of the given string as source data.

Parameters:
string - The string to use as source data
Returns:
The built Id.

buildIdDistance

public Id.Distance buildIdDistance(byte[] material)
Builds a protocol-specific Id.Distance given the source data.

Parameters:
material - The material to use
Returns:
The built Id.Distance.

buildIdRange

public rice.p2p.commonapi.IdRange buildIdRange(rice.p2p.commonapi.Id cw,
                                               rice.p2p.commonapi.Id ccw)
Creates an IdRange given the CW and CCW ids.

Parameters:
cw - The clockwise Id
ccw - The counterclockwise Id
Returns:
An IdRange with the appropriate delimiters.

buildIdSet

public rice.p2p.commonapi.IdSet buildIdSet()
Creates an empty IdSet.

Returns:
an empty IdSet

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection