Package org.infinispan.commons.tx
Class XidImpl
- java.lang.Object
-
- org.infinispan.commons.tx.XidImpl
-
- All Implemented Interfaces:
Xid
- Direct Known Subclasses:
EmbeddedXid
public class XidImpl extends Object implements Xid
AXid
implementation.If need to be serialized, use the methods
writeTo(ObjectOutput, XidImpl)
andreadFrom(ObjectInput)
or theAdvancedExternalizer
inEXTERNALIZER
.- Since:
- 9.1
- Author:
- Pedro Ruivo
-
-
Field Summary
Fields Modifier and Type Field Description static AdvancedExternalizer<XidImpl>
EXTERNALIZER
-
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
XidImpl(int formatId, byte[] globalTransactionId, byte[] branchQualifier)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
branchQualifierLength()
protected int
branchQualifierOffset()
static XidImpl
copy(Xid externalXid)
static XidImpl
create(int formatId, byte[] globalTransactionId, byte[] branchQualifier)
boolean
equals(Object o)
byte[]
getBranchQualifier()
int
getFormatId()
byte[]
getGlobalTransactionId()
protected int
globalIdLength()
protected int
globalIdOffset()
int
hashCode()
static String
printXid(int formatId, byte[] globalTransaction, byte[] branchQualifier)
protected byte[]
rawData()
static XidImpl
readFrom(ObjectInput input)
String
toString()
static void
writeTo(ObjectOutput output, XidImpl xid)
-
-
-
Field Detail
-
EXTERNALIZER
public static final AdvancedExternalizer<XidImpl> EXTERNALIZER
-
-
Method Detail
-
create
public static XidImpl create(int formatId, byte[] globalTransactionId, byte[] branchQualifier)
-
writeTo
public static void writeTo(ObjectOutput output, XidImpl xid) throws IOException
- Throws:
IOException
-
readFrom
public static XidImpl readFrom(ObjectInput input) throws IOException
- Throws:
IOException
-
printXid
public static String printXid(int formatId, byte[] globalTransaction, byte[] branchQualifier)
-
getFormatId
public int getFormatId()
- Specified by:
getFormatId
in interfaceXid
-
getGlobalTransactionId
public byte[] getGlobalTransactionId()
- Specified by:
getGlobalTransactionId
in interfaceXid
-
getBranchQualifier
public byte[] getBranchQualifier()
- Specified by:
getBranchQualifier
in interfaceXid
-
globalIdOffset
protected int globalIdOffset()
-
globalIdLength
protected int globalIdLength()
-
branchQualifierOffset
protected int branchQualifierOffset()
-
branchQualifierLength
protected int branchQualifierLength()
-
rawData
protected byte[] rawData()
-
-