java.lang.Object
io.ebeaninternal.server.idgen.UuidV1RndIdGenerator
io.ebeaninternal.server.idgen.UuidV1IdGenerator
- All Implemented Interfaces:
PlatformIdGenerator
IdGenerator for java util UUID.
It extends the UuidV1RndIdGenerator so that it can generate rfc4122 compliant Type 1 UUIDs.
This generator produces real Type 1 UUIDs (best for sqlserver) - You should use this generator only, if you can guarantee, that mac addess is uniqe or specify 'ebean.uuidNodeId' in your config file.
-
Field Summary
Fields inherited from class io.ebeaninternal.server.idgen.UuidV1RndIdGenerator
clockSeq, INSTANCE, log, MILLIS_TO_UUID, timeStamp, UUID_EPOCH_OFFSETFields inherited from interface io.ebean.config.dbplatform.PlatformIdGenerator
AUTO_UUID -
Method Summary
Modifier and TypeMethodDescriptionstatic UuidV1IdGeneratorgetInstance(File file, String nodeId) Returns an instance for given file.static UuidV1IdGeneratorgetInstance(String file, String nodeId) Returns an instance for given file.protected byte[]returns a random 47 bit value according to https://tools.ietf.org/html/rfc4122.html#section-4.5Returns the Node-identifier (=MAC address) as stringprotected voidSaves the state to the state file;Methods inherited from class io.ebeaninternal.server.idgen.UuidV1RndIdGenerator
computeNanoOffset, getName, isDbSequence, nextId, preAllocateIds
-
Method Details
-
getInstance
Returns an instance for given file. -
getInstance
Returns an instance for given file. -
getNodeIdentifier
Returns the Node-identifier (=MAC address) as string -
saveState
protected void saveState()Saves the state to the state file;- Overrides:
saveStatein classUuidV1RndIdGenerator
-
getNodeIdBytes
protected byte[] getNodeIdBytes()Description copied from class:UuidV1RndIdGeneratorreturns a random 47 bit value according to https://tools.ietf.org/html/rfc4122.html#section-4.5- Overrides:
getNodeIdBytesin classUuidV1RndIdGenerator
-