java.lang.Object
io.ebeaninternal.server.idgen.UuidV4IdGenerator
- All Implemented Interfaces:
PlatformIdGenerator
IdGenerator for java util UUID.
This generator generates a 60bit random UUID according to https://tools.ietf.org/html/rfc4122.html#section-4.4 Use this generator if you want truly random UUIDs
-
Field Summary
FieldsFields inherited from interface io.ebean.config.dbplatform.PlatformIdGenerator
AUTO_UUID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns "uuid".booleanReturns false.Return UUID from UUID.randomUUID();voidpreAllocateIds(int allocateSize) Ignored for UUID as not required as a performance optimisation.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
UuidV4IdGenerator
public UuidV4IdGenerator()
-
-
Method Details
-
nextId
Return UUID from UUID.randomUUID();- Specified by:
nextIdin interfacePlatformIdGenerator
-
getName
Returns "uuid".- Specified by:
getNamein interfacePlatformIdGenerator
-
isDbSequence
public boolean isDbSequence()Returns false.- Specified by:
isDbSequencein interfacePlatformIdGenerator
-
preAllocateIds
public void preAllocateIds(int allocateSize) Ignored for UUID as not required as a performance optimisation.- Specified by:
preAllocateIdsin interfacePlatformIdGenerator
-