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.Xidpublic byte[] getGlobalTransactionId()
getGlobalTransactionId in interface javax.transaction.xa.Xidpublic byte[] getBranchQualifier()
getBranchQualifier in interface javax.transaction.xa.Xidpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectprotected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic 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.