Skip to content

Commit 5cfb44f

Browse files
author
Petr Matousek
committed
incorporate recent development changes
1 parent ad85241 commit 5cfb44f

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

src/api/qpid-proton/reactor/handler/TxReceiverHandler.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void TxReceiverHandler::on_transaction_declared(session s) {
156156
batch_size = count;
157157
}
158158
logger(trace) << "[on_transaction_declared] txn called " << (&s);
159-
logger(debug) << "[on_transaction_declared] txn is_empty " << (s.txn_is_empty());
159+
logger(debug) << "[on_transaction_declared] txn is_empty " << (s.transaction_is_empty());
160160
}
161161

162162
void TxReceiverHandler::on_transaction_aborted(session s) {
@@ -371,7 +371,7 @@ void TxReceiverHandler::on_message(delivery &d, message &m)
371371
// TODO legit?
372372
session s = d.session();
373373

374-
s.txn_accept(d);
374+
s.transaction_accept(d);
375375
current_batch += 1;
376376

377377
logger(debug) << "[on_message] current batch: " << current_batch;
@@ -440,9 +440,9 @@ void TxReceiverHandler::on_message(delivery &d, message &m)
440440
if(current_batch == batch_size) {
441441
logger(debug) << "[send] Transaction attempt: " << tx_action;
442442
if (tx_action == "commit") {
443-
s.txn_commit();
443+
s.transaction_commit();
444444
} else if (tx_action == "rollback") {
445-
s.txn_abort();
445+
s.transaction_abort();
446446
}
447447

448448
if (tx_action == "none") {
@@ -462,9 +462,9 @@ void TxReceiverHandler::on_message(delivery &d, message &m)
462462
} else if (count != 0 && processed + current_batch == count) {
463463
logger(debug) << "[send] Transaction attempt (endloop): " << tx_endloop_action;
464464
if (tx_endloop_action == "commit") {
465-
s.txn_commit();
465+
s.transaction_commit();
466466
} else if (tx_endloop_action == "rollback") {
467-
s.txn_abort();
467+
s.transaction_abort();
468468
} else {
469469
recv.connection().close();
470470
}

src/api/qpid-proton/reactor/handler/TxReceiverHandler.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
#ifndef TXRECEIVERHANDLER_H
1515
#define TXRECEIVERHANDLER_H
1616

17-
#include <proton/transaction.hpp>
17+
#include <proton/transaction_handler.hpp>
1818

1919
#include "ReceiverHandler.h"
2020

21-
using proton::transaction;
2221
using proton::session;
2322
using proton::transaction_handler;
2423

src/api/qpid-proton/reactor/handler/TxSenderHandler.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ void TxSenderHandler::send(session s)
152152
}
153153

154154

155-
logger(trace) << "[send] Transaction is empty: " << s.txn_is_empty();
155+
logger(trace) << "[send] Transaction is empty: " << s.transaction_is_empty();
156156
logger(debug) << "[send] Messages processed: " << processed;
157157
logger(trace) << "[send] Current batch: " << current_batch;
158-
while (s.txn_is_declared() && sndr.credit() && (processed + current_batch) < count)
158+
while (s.transaction_is_declared() && sndr.credit() && (processed + current_batch) < count)
159159
{
160-
s.txn_send(sndr, message_to_send);
160+
sndr.send(message_to_send);
161161
current_batch += 1;
162162

163163
if (log_msgs == "dict") {
@@ -187,9 +187,9 @@ void TxSenderHandler::send(session s)
187187
if(current_batch == batch_size) {
188188
logger(debug) << "[send] Transaction attempt: " << tx_action;
189189
if (tx_action == "commit") {
190-
s.txn_commit();
190+
s.transaction_commit();
191191
} else if (tx_action == "rollback") {
192-
s.txn_abort();
192+
s.transaction_abort();
193193
}
194194

195195
if (tx_action == "none") {
@@ -204,9 +204,9 @@ void TxSenderHandler::send(session s)
204204
} else if (processed + current_batch == count) {
205205
logger(debug) << "[send] Transaction attempt (endloop): " << tx_endloop_action;
206206
if (tx_endloop_action == "commit") {
207-
s.txn_commit();
207+
s.transaction_commit();
208208
} else if (tx_endloop_action == "rollback") {
209-
s.txn_abort();
209+
s.transaction_abort();
210210
}
211211
sndr.connection().close();
212212
}
@@ -241,8 +241,8 @@ void TxSenderHandler::on_connection_close(connection &c)
241241

242242
void TxSenderHandler::on_transaction_declared(session s) {
243243
logger(trace) << "[on_transaction_declared] txn called " << (&s);
244-
logger(trace) << "[on_transaction_declared] txn is_empty " << (s.txn_is_empty())
245-
<< "\t" << s.txn_is_empty();
244+
logger(trace) << "[on_transaction_declared] txn is_empty " << (s.transaction_is_empty())
245+
<< "\t" << s.transaction_is_empty();
246246
send(s);
247247
}
248248

src/api/qpid-proton/reactor/handler/TxSenderHandler.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
#ifndef TXSENDERHANDLER_H
1515
#define TXSENDERHANDLER_H
1616

17-
#include <proton/transaction.hpp>
17+
#include <proton/transaction_handler.hpp>
1818

1919
#include "SenderHandler.h"
2020

21-
using proton::transaction;
2221
using proton::session;
2322
using proton::transaction_handler;
2423

0 commit comments

Comments
 (0)