com.atlassian.bamboo.v2.build.agent
Class BambooXidFactoryImpl

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.agent.BambooXidFactoryImpl
All Implemented Interfaces:
org.apache.geronimo.transaction.manager.XidFactory

public class BambooXidFactoryImpl
extends java.lang.Object
implements org.apache.geronimo.transaction.manager.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

    1. Constructor Summary
      BambooXidFactoryImpl()
                 
      BambooXidFactoryImpl(byte[] tmId)
                 
       
      Method Summary
       javax.transaction.xa.Xid createBranch(javax.transaction.xa.Xid globalId, int branch)
                 
       javax.transaction.xa.Xid createXid()
                 
       boolean matchesBranchId(byte[] branchQualifier)
                 
       boolean matchesGlobalId(byte[] globalTransactionId)
                 
       javax.transaction.xa.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

      BambooXidFactoryImpl

      public BambooXidFactoryImpl(byte[] tmId)

      BambooXidFactoryImpl

      public BambooXidFactoryImpl()
      Method Detail

      createXid

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

      createBranch

      public javax.transaction.xa.Xid createBranch(javax.transaction.xa.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 javax.transaction.xa.Xid recover(int formatId,
                                              byte[] globalTransactionid,
                                              byte[] branchQualifier)
      Specified by:
      recover in interface org.apache.geronimo.transaction.manager.XidFactory


      Copyright © 2012 Atlassian. All Rights Reserved.