org.infinispan.transaction.xa.recovery
Class SerializableXid

java.lang.Object
  extended by org.infinispan.transaction.xa.recovery.SerializableXid
All Implemented Interfaces:
Xid

@Immutable
public class SerializableXid
extends Object
implements Xid

This xid implementation is needed because Xid is not Serializable and we need to serialize it and send it over the network. As the KTA spec does not enforce in anyway the equals and hashcode methods on Xid TM providers are expected to be able to cope with this Xid class when returned from XAResource's methods.

Since:
5.0
Author:
Mircea.Markus@jboss.com

Nested Class Summary
static class SerializableXid.XidExternalizer
           
 
Field Summary
 
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
 
Constructor Summary
SerializableXid(byte[] branchQualifier, byte[] globalTransactionId, int formantId)
           
SerializableXid(Xid xid)
           
 
Method Summary
 boolean equals(Object o)
           
 byte[] getBranchQualifier()
           
 int getFormatId()
           
 byte[] getGlobalTransactionId()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SerializableXid

public SerializableXid(byte[] branchQualifier,
                       byte[] globalTransactionId,
                       int formantId)

SerializableXid

public SerializableXid(Xid xid)
Method Detail

getBranchQualifier

public byte[] getBranchQualifier()
Specified by:
getBranchQualifier in interface Xid

getGlobalTransactionId

public byte[] getGlobalTransactionId()
Specified by:
getGlobalTransactionId in interface Xid

getFormatId

public int getFormatId()
Specified by:
getFormatId in interface Xid

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

-->

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.