Record Class SimpleXid
java.lang.Object
java.lang.Record
org.bloomreach.forge.brut.common.repository.SimpleXid
- All Implemented Interfaces:
Xid
-
Field Summary
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE -
Constructor Summary
ConstructorsConstructorDescriptionSimpleXid(int formatId, byte[] globalTransactionId, byte[] branchQualifier) Creates an instance of aSimpleXidrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the value of thebranchQualifierrecord component.static SimpleXidcreate()final booleanIndicates whether some other object is "equal to" this one.intformatId()Returns the value of theformatIdrecord component.byte[]intbyte[]byte[]Returns the value of theglobalTransactionIdrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SimpleXid
public SimpleXid(int formatId, byte[] globalTransactionId, byte[] branchQualifier) Creates an instance of aSimpleXidrecord class.- Parameters:
formatId- the value for theformatIdrecord componentglobalTransactionId- the value for theglobalTransactionIdrecord componentbranchQualifier- the value for thebranchQualifierrecord component
-
-
Method Details
-
create
-
getFormatId
public int getFormatId()- Specified by:
getFormatIdin interfaceXid
-
getGlobalTransactionId
public byte[] getGlobalTransactionId()- Specified by:
getGlobalTransactionIdin interfaceXid
-
getBranchQualifier
public byte[] getBranchQualifier()- Specified by:
getBranchQualifierin interfaceXid
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
formatId
public int formatId()Returns the value of theformatIdrecord component.- Returns:
- the value of the
formatIdrecord component
-
globalTransactionId
public byte[] globalTransactionId()Returns the value of theglobalTransactionIdrecord component.- Returns:
- the value of the
globalTransactionIdrecord component
-
branchQualifier
public byte[] branchQualifier()Returns the value of thebranchQualifierrecord component.- Returns:
- the value of the
branchQualifierrecord component
-