activemq-cpp-3.4.0
|
An interface which provides a mapping for the X/Open XID transaction identifier structure. More...
#include <src/main/cms/Xid.h>
Public Member Functions | |
Xid () | |
virtual | ~Xid () |
virtual Xid * | clone () const =0 |
Creates a Copy of this Xid instance that contains the same id values. | |
virtual bool | equals (const Xid *other) const =0 |
Compares this Xid to another and returns true if they are the same. | |
virtual int | getBranchQualifier (unsigned char *buffer, int size) const =0 |
Gets the transaction branch qualifier component of the XID. | |
virtual int | getFormatId () const =0 |
Gets the format identifier component of the XID. | |
virtual int | getGlobalTransactionId (unsigned char *buffer, int size) const =0 |
Gets the global transaction id component of the XID. | |
Static Public Attributes | |
static const int | MAXGTRIDSIZE |
The maximum number of bytes which will be copied into the array passed to getGlobaltransactionId(). | |
static const int | MAXBQUALSIZE |
The maximum number of bytes which will be copied into the array that is passed to getBranchQualifier(). |
An interface which provides a mapping for the X/Open XID transaction identifier structure.
The Xid interface is used by the Transaction Manager and the Resource managers. It is not typically used by application programs directly but the application developer must define a mechanism to map the calls and structures used by the Transaction Manager API in use into the format used by the CMS XA interfaces.
cms::Xid::Xid | ( | ) |
virtual cms::Xid::~Xid | ( | ) | [virtual] |
virtual Xid* cms::Xid::clone | ( | ) | const [pure virtual] |
Creates a Copy of this Xid instance that contains the same id values.
Implemented in activemq::commands::XATransactionId.
virtual bool cms::Xid::equals | ( | const Xid * | other | ) | const [pure virtual] |
Compares this Xid to another and returns true if they are the same.
virtual int cms::Xid::getBranchQualifier | ( | unsigned char * | buffer, |
int | size | ||
) | const [pure virtual] |
Gets the transaction branch qualifier component of the XID.
The value of this Xid's branch qualifier is copied into the buffer provided. If the size of the provided buffer is not large enough to accommodate the branch qualifier then no copy is performed and the method returns -1.
buffer | The location in memory to copy the qualifier bytes to. |
size | The size of the buffer provided. |
XAException | if the size parameter is less than zero or buffer is NULL. |
Implemented in activemq::commands::XATransactionId.
virtual int cms::Xid::getFormatId | ( | ) | const [pure virtual] |
Gets the format identifier component of the XID.
Implemented in activemq::commands::XATransactionId.
virtual int cms::Xid::getGlobalTransactionId | ( | unsigned char * | buffer, |
int | size | ||
) | const [pure virtual] |
Gets the global transaction id component of the XID.
The value of this Xid's transaction id is copied into the buffer provided. If the size of the provided buffer is not large enough to accommodate the transaction id then no copy is performed and the method returns -1.
buffer | The location in memory to copy the transaction id bytes to. |
size | The size of the buffer provided. |
XAException | if the size parameter is less than zero or buffer is NULL. |
Implemented in activemq::commands::XATransactionId.
const int cms::Xid::MAXBQUALSIZE [static] |
The maximum number of bytes which will be copied into the array that is passed to getBranchQualifier().
const int cms::Xid::MAXGTRIDSIZE [static] |
The maximum number of bytes which will be copied into the array passed to getGlobaltransactionId().