Package org.wildfly.transaction.client
Class SimpleXid
- java.lang.Object
-
- org.wildfly.transaction.client.SimpleXid
-
- All Implemented Interfaces:
Comparable<SimpleXid>,Xid
public final class SimpleXid extends Object implements Xid, Comparable<SimpleXid>
A special simplified XID implementation which can only be compared with itself.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description static SimpleXidEMPTYA completely emptySimpleXid, which sorts below all otherSimpleXidinstances.static byte[]NO_BYTESAn empty byte array used when there is an empty XID component.static SimpleXid[]NO_SIMPLE_XIDSAn emptySimpleXidarray.static Xid[]NO_XIDSAn empty XID array.-
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
-
-
Constructor Summary
Constructors Constructor Description SimpleXid(int formatId, byte[] gtId, byte[] bq)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(SimpleXid o)booleanequals(Object obj)booleanequals(SimpleXid obj)byte[]getBranchQualifier()intgetFormatId()byte[]getGlobalTransactionId()inthashCode()static SimpleXidof(String xidHexString)static SimpleXidof(String xidHexString, char separator)static SimpleXidof(Xid xid)StringtoHexString()StringtoHexString(char separator)StringtoString()SimpleXidwithoutBranch()
-
-
-
Field Detail
-
NO_BYTES
public static final byte[] NO_BYTES
An empty byte array used when there is an empty XID component.
-
NO_XIDS
public static final Xid[] NO_XIDS
An empty XID array.
-
NO_SIMPLE_XIDS
public static final SimpleXid[] NO_SIMPLE_XIDS
An emptySimpleXidarray.
-
EMPTY
public static final SimpleXid EMPTY
A completely emptySimpleXid, which sorts below all otherSimpleXidinstances.
-
-
Method Detail
-
getFormatId
public int getFormatId()
- Specified by:
getFormatIdin interfaceXid
-
getGlobalTransactionId
public byte[] getGlobalTransactionId()
- Specified by:
getGlobalTransactionIdin interfaceXid
-
getBranchQualifier
public byte[] getBranchQualifier()
- Specified by:
getBranchQualifierin interfaceXid
-
equals
public boolean equals(SimpleXid obj)
-
withoutBranch
public SimpleXid withoutBranch()
-
compareTo
public int compareTo(SimpleXid o)
- Specified by:
compareToin interfaceComparable<SimpleXid>
-
toHexString
public String toHexString()
-
toHexString
public String toHexString(char separator)
-
-