public class UidGenerator
extends java.lang.Object
Generated UIDs are at most 64 bytes long and are made of 3 subparts: the current time in milliseconds since
Epoch, a JVM transient atomic sequence number and the configured bitronix.tm.serverId.
The reliance on the system clock is critical to the uniqueness of the UID in the network so you have to make sure all servers of the network running this transaction manager have their clock reasonably in sync. An order of 1 second synchronicity is generally fine.
| Constructor and Description |
|---|
UidGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static Uid |
generateUid()
Generate a UID, globally unique.
|
static BitronixXid |
generateXid(Uid gtrid)
Generate a XID with the specified globalTransactionId.
|
public static Uid generateUid()
public static BitronixXid generateXid(Uid gtrid)
gtrid - the GTRID to use to generate the Xid.Copyright © 2006-2021 Bitronix Software. All Rights Reserved.