|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface provides methods with a way of generating Ids.
Method Summary | |
java.util.Iterator |
buildDistributedIds(long desiredNetworkSize)
The Iterator instance returned permits to build as maximum desiredNetworkSize. |
Id |
buildId()
Builds an Id with the actual configuration of network topology and size. |
Id |
buildId(java.math.BigInteger material)
Generate an Id from a BigInteger, that includes its internal value. |
Id |
buildId(byte[] material)
Builds a protocol-specific Id given the source data. |
Id |
buildId(double material)
Builds a protocol-specific Id given the source data. |
Id |
buildId(int material)
Builds a protocol-specific Id given the source data. |
Id |
buildId(int[] material)
Builds a protocol-specific Id given the source data as int[]. |
Id |
buildId(java.lang.String material)
Generate an Id from the String as its internal value. |
Id |
buildId(java.lang.String material,
java.lang.String algorithm)
Builds a new Id from an arbitray string applying a one-way hashing algorithm, such as SHA-1 or MD5. |
Id |
buildKey(java.lang.String materialToHash)
Builds a protocol-specific Id by using the given string as source data for a hash function (like SHA-1). |
Id |
buildRandomId()
Builds an uniformly distributed random Id. |
Method Detail |
public Id buildId() throws InitializationException
InitializationException
- when an error occurs during the
initialization of the Id or when this factory method is
nonapplicable.public Id buildId(int material) throws InitializationException
material
- The material to use as double value.
InitializationException
- when an error occurs during the
initialization of the Id or when this factory method is
nonapplicable.public Id buildId(double material) throws InitializationException
material
- The material to use as double value.
InitializationException
- when an error occurs during the
initialization of the Id or when this factory method is
nonapplicable.public Id buildId(byte[] material) throws InitializationException
material
- The material to use to build the new Id.
InitializationException
- when an error occurs during the
initialization of the Id or when this factory method is
nonapplicable.public Id buildId(int[] material) throws InitializationException
material
- The internal representation value of the new Id
as int[].
InitializationException
- when an error occurs during the
initialization of the Id or when this factory method is
nonapplicable.public Id buildKey(java.lang.String materialToHash) throws InitializationException
materialToHash
- The string to use as source data for a hash function.
InitializationException
- when an error occurs during the
initialization of the Id or when this factory method is
nonapplicable.public Id buildId(java.lang.String material) throws InitializationException
material
- With the String representation of the
internal value.
InitializationException
- when an error occurs during the
initialization of the Id or when this factory method is
nonapplicable.public Id buildId(java.math.BigInteger material) throws InitializationException
material
- BigInteger with the internal value for the new Id.
InitializationException
- when an error occurs during the
initialization of the Id or when this factory method is
nonapplicable.public Id buildId(java.lang.String material, java.lang.String algorithm) throws InitializationException
material
- An arbitray string.algorithm
- One-way hashing algorithm such as "SHA" or "MD5".
InitializationException
- when an error occurs during the
initialization of the Id or when this factory method is
nonapplicable.public Id buildRandomId() throws InitializationException
InitializationException
- if an error occurs during the
initialization of the Id.public java.util.Iterator buildDistributedIds(long desiredNetworkSize) throws InitializationException
desiredNetworkSize
- Number of nodes Id to obtain.
InitializationException
- if any error has ocurred during the initialization.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |