Skip to content

Commit f158e6f

Browse files
author
Petr Matousek
committed
wip: initial version refactoring #3
1 parent 0868f92 commit f158e6f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ TxReceiverHandler::TxReceiverHandler(
6363
string recv_listen,
6464
int recv_listen_port,
6565
int recv_credit_window,
66-
bool recv_drain_after_credit_window
66+
bool recv_drain_after_credit_window,
67+
string tx_action,
68+
string tx_endloop_action
6769
)
6870
: super(
6971
url,
@@ -111,7 +113,9 @@ TxReceiverHandler::TxReceiverHandler(
111113
recv_listen(recv_listen),
112114
recv_listen_port(recv_listen_port),
113115
recv_credit_window(recv_credit_window),
114-
recv_drain_after_credit_window(recv_drain_after_credit_window)
116+
recv_drain_after_credit_window(recv_drain_after_credit_window),
117+
tx_action(tx_action),
118+
tx_endloop_action(tx_endloop_action)
115119
{
116120
}
117121

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ class TxReceiverHandler : public CommonHandler, transaction_handler {
160160
string recv_listen = "false",
161161
int recv_listen_port = 5672,
162162
int recv_credit_window = -1,
163-
bool recv_drain_after_credit_window = false
163+
bool recv_drain_after_credit_window = false,
164+
string tx_action = "commit",
165+
string tx_endloop_action = "commit"
164166
);
165167

166168
virtual ~TxReceiverHandler();
@@ -242,11 +244,13 @@ class TxReceiverHandler : public CommonHandler, transaction_handler {
242244

243245
void do_disconnect();
244246

245-
// transact
247+
// transaction variables
246248
int batch_size = 0;
247249
int current_batch = 0;
248250
int committed = 0;
249251
int confirmed = 0;
252+
string tx_action = "commit";
253+
string tx_endloop_action = "commit";
250254

251255
transaction *tx;
252256
};

0 commit comments

Comments
 (0)