|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.drools.util.UUIDGenerator
public final class UUIDGenerator
Ripped from JUG
org.safehaus.jug
Method Summary | |
---|---|
UUID |
generateRandomBasedUUID()
Method for generating (pseudo-)random based UUIDs, using the default (shared) SecureRandom object. |
UUID |
generateRandomBasedUUID(Random randomGenerator)
Method for generating (pseudo-)random based UUIDs, using the specified SecureRandom object. |
MessageDigest |
getHashAlgorithm()
|
static UUIDGenerator |
getInstance()
Method used for accessing the singleton generator instance. |
Random |
getRandomNumberGenerator()
Method for getting the shared random number generator used for generating the UUIDs. |
void |
setRandomNumberGenerator(Random r)
Method that can be called to specify alternative random number generator to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static UUIDGenerator getInstance()
public Random getRandomNumberGenerator()
public void setRandomNumberGenerator(Random r)
SecureRandom
that is used by default.
Note that to avoid first-time initialization penalty
of using SecureRandom
, this method has to be called
before generating the first random-number based UUID.
public MessageDigest getHashAlgorithm()
public UUID generateRandomBasedUUID()
public UUID generateRandomBasedUUID(Random randomGenerator)
randomGenerator
- Random number generator to use for getting the
random number from which UUID will be composed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |