XTA: API Reference for C language

xta_transaction.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009-2019, Christian Ferrari <tiian@users.sourceforge.net>
3  * All rights reserved.
4  *
5  * This file is part of LIXA.
6  *
7  * LIXA is free software: you can redistribute this file and/or modify
8  * it under the terms of the GNU Lesser General Public License version 2.1 as
9  * published by the Free Software Foundation.
10  *
11  * LIXA is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with LIXA. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef XTA_TRANSACTION_H
20 # define XTA_TRANSACTION_H
21 
22 
23 
24 /* XTA includes */
25 #include "xta_config.h"
26 #include "xta_xa_resource.h"
27 
28 
29 
37 
38 
39 
40 /*
41  * This type is a declaration only statement: the real type is defined inside
42  * XA Resource header file. Here we just need to store a pointer to
43  * a XA Resource inside an XA Transaction.
44  */
46 
47 
48 
52 typedef struct xta_transaction_s {
85 
86 
87 
88 #ifdef __cplusplus
89 extern "C" {
90 #endif /* __cplusplus */
91 
92 
93 
100 
101 
102 
110  void xta_transaction_delete(xta_transaction_t *transact) DEPRECATED;
111 
112 
113 
120  int xta_transaction_safe_delete(const xta_transaction_t *transact);
121 
122 
123 
131 
132 
133 
142  xta_xa_resource_t *xa_res);
143 
144 
148  int xta_transaction_open(xta_transaction_t *transact) DEPRECATED ;
149  /*
150  * Prepare the XA Resource Managers and the XA Transaction Manager for a
151  * new transactional Unit of Work. From the XA specification point of view,
152  * it calls xa_open (for the Native XA Resource Managers)
153  * @param[in,out] transact : transaction object
154  * @return a reason code
155  */
157 
158 
159 
163  int xta_transaction_close(xta_transaction_t *transact) DEPRECATED ;
164  /*
165  * Shut down the XA Resource Managers and the XA Transaction Manager after
166  * transactional Unit of Work completion. From the XA specification point
167  * of view, it calls xa_close (for the Native XA Resource Managers)
168  * @param[in,out] transact : transaction object
169  * @return a reason code
170  */
172 
173 
174 
185 
186 
187 
202  int multiple_branches);
203 
204 
205 
215  int xta_transaction_commit(xta_transaction_t *transact, int non_blocking);
216 
217 
218 
225 
226 
227 
237  const xta_xa_resource_config_t *xrc);
238 
239 
240 
250  int xta_transaction_suspend(xta_transaction_t *transact, long flags);
251 
252 
253 
267  const char *xid_string, long flags);
268 
269 
270 
280  const char *xid_string);
281 
282 
283 
290  const xta_transaction_t *transact);
291 
292 
293 
300  const xta_transaction_t *transact);
301 
302 
303 
304 #ifdef __cplusplus
305 }
306 #endif /* __cplusplus */
307 
308 
309 
310 #endif /* XTA_TRANSACTION_H */
int xta_transaction_open_internal(xta_transaction_t *transact)
int xta_transaction_resume(xta_transaction_t *transact, const char *xid_string, long flags)
xta_transaction_t * xta_transaction_new(void)
void xta_transaction_client_status_t
int xta_transaction_branch(xta_transaction_t *transact, const char *xid_string)
int xta_transaction_open(xta_transaction_t *transact) DEPRECATED
void xta_config_t
Definition: xta_config.h:30
int xta_transaction_get_multiple_branches(const xta_transaction_t *transact)
xta_config_t * local_ccc
int xta_transaction_redigest(xta_transaction_t *transact, const xta_xa_resource_config_t *xrc)
int xta_transaction_close(xta_transaction_t *transact) DEPRECATED
int xta_transaction_recover(xta_transaction_t *transact)
int xta_transaction_commit(xta_transaction_t *transact, int non_blocking)
xta_transaction_client_status_t * client_status
const xta_xid_t * xta_transaction_get_xid(const xta_transaction_t *transact)
int xta_transaction_rollback(xta_transaction_t *transact)
struct act_rsrmgr_config_s xta_xa_resource_config_t
void xta_transaction_delete(xta_transaction_t *transact) DEPRECATED
int xta_transaction_close_internal(xta_transaction_t *transact)
struct xta_transaction_s xta_transaction_t
int xta_transaction_suspend(xta_transaction_t *transact, long flags)
int xta_transaction_safe_delete(const xta_transaction_t *transact)
xta_config_t * xta_transaction_get_config(xta_transaction_t *transact)
int xta_transaction_enlist_resource(xta_transaction_t *transact, xta_xa_resource_t *xa_res)
int xta_transaction_start(xta_transaction_t *transact, int multiple_branches)

Copyright © 2009-2019, Christian Ferrari tiian@users.sourceforge.net http://www.tiian.org/