public class AlternativeJdkIdGenerator extends java.lang.Object implements IdGenerator
IdGenerator
that uses SecureRandom
for the initial seed and
Random
thereafter, instead of calling UUID.randomUUID()
every
time as JdkIdGenerator
does.
This provides a better balance between securely random ids and performance.Constructor and Description |
---|
AlternativeJdkIdGenerator() |
Modifier and Type | Method and Description |
---|---|
java.util.UUID |
generateId()
Generate a new identifier.
|
public java.util.UUID generateId()
IdGenerator
generateId
in interface IdGenerator