Skip to content

Commit

Permalink
wip: initial version refactoring #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Matousek committed Dec 2, 2024
1 parent 0868f92 commit f158e6f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/api/qpid-proton/reactor/handler/TxReceiverHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ TxReceiverHandler::TxReceiverHandler(
string recv_listen,
int recv_listen_port,
int recv_credit_window,
bool recv_drain_after_credit_window
bool recv_drain_after_credit_window,
string tx_action,
string tx_endloop_action
)
: super(
url,
Expand Down Expand Up @@ -111,7 +113,9 @@ TxReceiverHandler::TxReceiverHandler(
recv_listen(recv_listen),
recv_listen_port(recv_listen_port),
recv_credit_window(recv_credit_window),
recv_drain_after_credit_window(recv_drain_after_credit_window)
recv_drain_after_credit_window(recv_drain_after_credit_window),
tx_action(tx_action),
tx_endloop_action(tx_endloop_action)
{
}

Expand Down
8 changes: 6 additions & 2 deletions src/api/qpid-proton/reactor/handler/TxReceiverHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ class TxReceiverHandler : public CommonHandler, transaction_handler {
string recv_listen = "false",
int recv_listen_port = 5672,
int recv_credit_window = -1,
bool recv_drain_after_credit_window = false
bool recv_drain_after_credit_window = false,
string tx_action = "commit",
string tx_endloop_action = "commit"
);

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

void do_disconnect();

// transact
// transaction variables
int batch_size = 0;
int current_batch = 0;
int committed = 0;
int confirmed = 0;
string tx_action = "commit";
string tx_endloop_action = "commit";

transaction *tx;
};
Expand Down

0 comments on commit f158e6f

Please sign in to comment.