public class UuidXid
extends java.lang.Object
implements javax.transaction.xa.Xid, java.io.Serializable
Xid
based on UUID
, using max significant
bits as global transaction id, and least significant bits as branch
qualifier.Modifier and Type | Field and Description |
---|---|
static int |
FORMAT |
Constructor and Description |
---|
UuidXid() |
UuidXid(java.util.UUID uuid) |
UuidXid(javax.transaction.xa.Xid xid) |
Modifier and Type | Method and Description |
---|---|
java.util.UUID |
asUuid() |
static java.util.UUID |
bytesToUUID(byte[] most,
byte[] least) |
protected java.lang.Object |
clone() |
boolean |
equals(java.lang.Object obj) |
byte[] |
getBranchQualifier() |
int |
getFormatId() |
byte[] |
getGlobalTransactionId() |
int |
hashCode() |
java.lang.String |
toString() |
static byte[] |
uuidToBytes(long bits) |
public static final int FORMAT
public UuidXid()
public UuidXid(java.util.UUID uuid)
public UuidXid(javax.transaction.xa.Xid xid)
public int getFormatId()
getFormatId
in interface javax.transaction.xa.Xid
public byte[] getGlobalTransactionId()
getGlobalTransactionId
in interface javax.transaction.xa.Xid
public byte[] getBranchQualifier()
getBranchQualifier
in interface javax.transaction.xa.Xid
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.UUID asUuid()
public static byte[] uuidToBytes(long bits)
public static java.util.UUID bytesToUUID(byte[] most, byte[] least)
Copyright © 2007–2020. All rights reserved.