org.apache.aries.transaction
Class XidFactoryImpl

java.lang.Object
  extended by org.apache.aries.transaction.XidFactoryImpl
All Implemented Interfaces:
org.apache.geronimo.transaction.manager.XidFactory

public class XidFactoryImpl
extends Object
implements org.apache.geronimo.transaction.manager.XidFactory

Factory for transaction ids that are ever increasing allowing determination of new transactions The Xid is constructed of two parts:

  1. 8 byte id (LSB first)
  2. base id
    1. can't easily extend geronimo XidFactoryImpl b/c count is private


      Constructor Summary
      XidFactoryImpl(byte[] tmId)
                 
       
      Method Summary
       Xid createBranch(Xid globalId, int branch)
                 
       Xid createXid()
                 
       boolean matchesBranchId(byte[] branchQualifier)
                 
       boolean matchesGlobalId(byte[] globalTransactionId)
                 
       Xid recover(int formatId, byte[] globalTransactionid, byte[] branchQualifier)
                 
       
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
       

      Constructor Detail

      XidFactoryImpl

      public XidFactoryImpl(byte[] tmId)
      Method Detail

      createXid

      public Xid createXid()
      Specified by:
      createXid in interface org.apache.geronimo.transaction.manager.XidFactory

      createBranch

      public Xid createBranch(Xid globalId,
                              int branch)
      Specified by:
      createBranch in interface org.apache.geronimo.transaction.manager.XidFactory

      matchesGlobalId

      public boolean matchesGlobalId(byte[] globalTransactionId)
      Specified by:
      matchesGlobalId in interface org.apache.geronimo.transaction.manager.XidFactory

      matchesBranchId

      public boolean matchesBranchId(byte[] branchQualifier)
      Specified by:
      matchesBranchId in interface org.apache.geronimo.transaction.manager.XidFactory

      recover

      public Xid recover(int formatId,
                         byte[] globalTransactionid,
                         byte[] branchQualifier)
      Specified by:
      recover in interface org.apache.geronimo.transaction.manager.XidFactory


      Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.