Package com.sun.jts.jtsxa
Class XID
- java.lang.Object
-
- com.sun.jts.jtsxa.XID
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAXBQUALSIZE
The maximum size of the branch qualifier.static int
MAXGTRIDSIZE
The maximum size of the global transaction identifier.
-
Constructor Summary
Constructors Constructor Description XID()
Constructs a new null XID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copy(XID from)
Initialize an XID using another XID as the source of data.void
copy(org.omg.CosTransactions.otid_t from)
Initialize an XID using an omg otid_t as the source of data.boolean
equals(Object o)
Determine whether or not two objects of this type are equal.byte[]
getBranchQualifier()
Returns the branch qualifier for this XID.int
getFormatId()
int
getFormatID()
Obtain the format identifier part of the XID.byte[]
getGlobalTransactionId()
byte[]
getGlobalTransactionIdentifier()
Returns the global transaction identifier for this XID.int
hashCode()
Compute the hash code.boolean
isEqualBranchQualifier(byte[] data)
Compares the input parameter with the branch qualifier for equality.boolean
isEqualGtrid(XID xid)
Return whether the Gtrid of this is equal to the Gtrid of xidvoid
setBranchQualifier(byte[] qual)
Set the branch qualifier for this XID.void
setFormatID(int formatID)
Set the format identifier part of the XID.String
toString()
Return a string representing this XID.
-
-
-
Field Detail
-
MAXGTRIDSIZE
public static final int MAXGTRIDSIZE
The maximum size of the global transaction identifier.- See Also:
- Constant Field Values
-
MAXBQUALSIZE
public static final int MAXBQUALSIZE
The maximum size of the branch qualifier.- See Also:
- Constant Field Values
-
-
Method Detail
-
copy
public void copy(XID from)
Initialize an XID using another XID as the source of data.- Parameters:
from
- the XID to initialize this XID from
-
copy
public void copy(org.omg.CosTransactions.otid_t from)
Initialize an XID using an omg otid_t as the source of data.- Parameters:
from
- the OMG otid_t to initialize this XID from- See Also:
otid_t
-
equals
public boolean equals(Object o)
Determine whether or not two objects of this type are equal.
-
hashCode
public int hashCode()
Compute the hash code.
-
toString
public String toString()
Return a string representing this XID.
-
getBranchQualifier
public byte[] getBranchQualifier()
Returns the branch qualifier for this XID.- Specified by:
getBranchQualifier
in interfaceXid
- Returns:
- the branch qualifier
-
setBranchQualifier
public void setBranchQualifier(byte[] qual)
Set the branch qualifier for this XID.- Parameters:
qual
- a Byte array containing the branch qualifier to be set. If the size of the array exceeds MAXBQUALSIZE, only the first MAXBQUALSIZE elements of qual will be used.
-
getFormatID
public int getFormatID()
Obtain the format identifier part of the XID.- Returns:
- Format identifier. -1 indicates a null XID
-
setFormatID
public void setFormatID(int formatID)
Set the format identifier part of the XID.- Parameters:
Format
- identifier. -1 indicates a null Xid.
-
isEqualBranchQualifier
public boolean isEqualBranchQualifier(byte[] data)
Compares the input parameter with the branch qualifier for equality.- Returns:
- true if equal
-
isEqualGtrid
public boolean isEqualGtrid(XID xid)
Return whether the Gtrid of this is equal to the Gtrid of xid
-
getGlobalTransactionIdentifier
public byte[] getGlobalTransactionIdentifier()
Returns the global transaction identifier for this XID.- Returns:
- the global transaction identifier
-
getFormatId
public int getFormatId()
- Specified by:
getFormatId
in interfaceXid
-
getGlobalTransactionId
public byte[] getGlobalTransactionId()
- Specified by:
getGlobalTransactionId
in interfaceXid
-
-