Class XidFactoryImpl

  • All Implemented Interfaces:

    public class XidFactoryImpl
    extends Object
    implements XidFactory
    Factory for transaction ids. The Xid is constructed of three parts:
    1. 8 byte count (LSB first)
    2. 4 byte system id
    3. 2 byte entropy
    4. 4 or 16 byte IP address of host
      • Constructor Detail

        • XidFactoryImpl

          public XidFactoryImpl​(byte[] tmId)
        • XidFactoryImpl

          public XidFactoryImpl()
      • Method Detail

        • matchesGlobalId

          public boolean matchesGlobalId​(byte[] globalTransactionId)
          Specified by:
          matchesGlobalId in interface XidFactory
        • matchesBranchId

          public boolean matchesBranchId​(byte[] branchQualifier)
          Specified by:
          matchesBranchId in interface XidFactory
        • recover

          public Xid recover​(int formatId,
                             byte[] globalTransactionid,
                             byte[] branchQualifier)
          Specified by:
          recover in interface XidFactory