|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeersim.pastry.UniformRandomGenerator
public final class UniformRandomGenerator
This initializator assign to the Nodes a nodeId (stored in the protocol MSPastryProtocol) by using this 128-bit (32 byte) random generator. Warning: this implementation is not serialized and is not thread-safe
Title: MSPASTRY
Description: MsPastry implementation for PeerSim
Copyright: Copyright (c) 2007
Company: The Pastry Group
Constructor Summary | |
---|---|
UniformRandomGenerator(int aBits,
long aSeed)
instanciate the random generator with the given seed |
|
UniformRandomGenerator(int aBits,
java.util.Random r)
initialized this random generator with the specified random seeder and the number of desider bits to generate |
Method Summary | |
---|---|
java.math.BigInteger |
generate()
Returns a unique 128-bit random number. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UniformRandomGenerator(int aBits, java.util.Random r)
aBits
- intr
- Randompublic UniformRandomGenerator(int aBits, long aSeed)
aSeed
- longaBits
- number of bits of the number-to-be-generateedMethod Detail |
---|
public final java.math.BigInteger generate()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |