public class CustomVersionOneStrategy extends Object implements UUIDGenerationStrategy
UUIDHexGenerator id generator
but uses a RFC 4122 compliant layout (variant 2).
NOTE : Can be a bottle neck due to the need to synchronize in order to increment an
internal count as part of the algorithm.| Constructor and Description |
|---|
CustomVersionOneStrategy() |
| Modifier and Type | Method and Description |
|---|---|
static long |
generateLeastSignificantBits(long seed) |
UUID |
generateUUID(SessionImplementor session)
Generate the UUID.
|
int |
getGeneratedVersion()
Which variant, according to IETF RFC 4122, of UUID does this strategy generate?
|
long |
getMostSignificantBits() |
static void |
main(String[] args) |
public int getGeneratedVersion()
UUIDGenerationStrategygetGeneratedVersion in interface UUIDGenerationStrategypublic UUID generateUUID(SessionImplementor session)
UUIDGenerationStrategygenerateUUID in interface UUIDGenerationStrategysession - The session asking for the generationpublic long getMostSignificantBits()
public static long generateLeastSignificantBits(long seed)
public static void main(String[] args)
Copyright © 2016. All rights reserved.