| Apache Ignite C++

Public Member Functions | List of all members
ignite::transactions::Transactions Class Reference

Transactions facade. More...

`#include <transactions.h>`

## Public Member Functions
| Transactions (ignite::common::concurrent::SharedPointer< impl::transactions::TransactionsImpl > impl)
| Constructor. More...
| Transactions (const Transactions &other)
| Copy constructor. More...
Transactions & | operator= (const Transactions &other)
| Assignment operator. More...
| ~Transactions ()
| Destructor.
Transaction | GetTx ()
| Get active transaction for the current thread. More...
Transaction | TxStart ()
| Start new transaction with default isolation, concurrency and timeout. More...
Transaction | TxStart (IgniteError &err)
| Start new transaction with default isolation, concurrency and timeout. More...
Transaction | TxStart (TransactionConcurrency::Type concurrency, TransactionIsolation::Type isolation)
| Starts new transaction with the specified concurrency and isolation. More...
Transaction | TxStart (TransactionConcurrency::Type concurrency, TransactionIsolation::Type isolation, IgniteError &err)
| Starts new transaction with the specified concurrency and isolation. More...
Transaction | TxStart (TransactionConcurrency::Type concurrency, TransactionIsolation::Type isolation, int64_t timeout, int32_t txSize)
| Starts transaction with specified isolation, concurrency, timeout, and number of participating entries. More...
Transaction | TxStart (TransactionConcurrency::Type concurrency, TransactionIsolation::Type isolation, int64_t timeout, int32_t txSize, IgniteError &err)
| Start new transaction. More...
TransactionMetrics | GetMetrics ()
| Get transaction metrics. More...
TransactionMetrics | GetMetrics (IgniteError &err)
| Get transaction metrics. More...

## Detailed Description

Transactions facade.

This class is implemented as a reference to an implementation so copying of this class instance will only create another reference to the same underlying object. Underlying object will be released automatically once all the instances are destructed.

## Constructor & Destructor Documentation

## ◆ Transactions() [1/2]

ignite::transactions::Transactions::Transactions | ( | ignite::common::concurrent::SharedPointer< impl::transactions::TransactionsImpl > | impl | ) |

Constructor.

Internal method. Should not be used by user.

Parameters

  impl | Implementation.

## ◆ Transactions() [2/2]

ignite::transactions::Transactions::Transactions | ( | const Transactions & | other | ) |

Copy constructor.

Parameters

  other | Other instance.

## Member Function Documentation

## ◆ GetMetrics() [1/2]

TransactionMetrics ignite::transactions::Transactions::GetMetrics | ( |  | ) |

Get transaction metrics.

Returns
  Metrics instance.

## ◆ GetMetrics() [2/2]

TransactionMetrics ignite::transactions::Transactions::GetMetrics | ( | IgniteError & | err | ) |

Get transaction metrics.

Parameters

  err | Error.

Returns
  Metrics instance. Returned instance is not valid if an error occurred during the operation.

## ◆ GetTx()

Transaction ignite::transactions::Transactions::GetTx | ( |  | ) |

Get active transaction for the current thread.

Returns
  Active transaction for current thread. Returned instance is not valid if there is no active transaction for the thread.

## ◆ operator=()

Transactions & ignite::transactions::Transactions::operator= | ( | const Transactions & | other | ) |

Assignment operator.

Parameters

  other | Other instance.

Returns
  This.

## ◆ TxStart() [1/6]

Transaction ignite::transactions::Transactions::TxStart | ( |  | ) |

Start new transaction with default isolation, concurrency and timeout.

Returns
  New transaction instance.

## ◆ TxStart() [2/6]

Transaction ignite::transactions::Transactions::TxStart | ( | IgniteError & | err | ) |

Start new transaction with default isolation, concurrency and timeout.

Parameters

  err | Error.

Returns
  New transaction instance.

## ◆ TxStart() [3/6]

Transaction ignite::transactions::Transactions::TxStart | ( | TransactionConcurrency::Type | concurrency,
|  | TransactionIsolation::Type | isolation
| ) |  |

Starts new transaction with the specified concurrency and isolation.

Parameters

  concurrency | Concurrency.
  isolation | Isolation.

Returns
  New transaction instance.

## ◆ TxStart() [4/6]

Transaction ignite::transactions::Transactions::TxStart | ( | TransactionConcurrency::Type | concurrency,
|  | TransactionIsolation::Type | isolation,
|  | IgniteError & | err
| ) |  |

Starts new transaction with the specified concurrency and isolation.

Parameters

  concurrency | Concurrency.
  isolation | Isolation.
  err | Error.

Returns
  New transaction instance.

## ◆ TxStart() [5/6]

Transaction ignite::transactions::Transactions::TxStart | ( | TransactionConcurrency::Type | concurrency,
|  | TransactionIsolation::Type | isolation,
|  | int64_t | timeout,
|  | int32_t | txSize
| ) |  |

Starts transaction with specified isolation, concurrency, timeout, and number of participating entries.

Parameters

  concurrency | Concurrency.
  isolation | Isolation.
  timeout | Timeout. Zero if for infinite timeout.
  txSize | Number of entries participating in transaction (may be approximate).

Returns
  New transaction instance.

## ◆ TxStart() [6/6]

Transaction ignite::transactions::Transactions::TxStart | ( | TransactionConcurrency::Type | concurrency,
|  | TransactionIsolation::Type | isolation,
|  | int64_t | timeout,
|  | int32_t | txSize,
|  | IgniteError & | err
| ) |  |

Start new transaction.

Parameters

  concurrency | Concurrency.
  isolation | Isolation.
  timeout | Timeout. Zero if for infinite timeout.
  txSize | Number of entries participating in transaction (may be approximate).
  err | Error.

Returns
  New transaction instance.

The documentation for this class was generated from the following files:

- core/include/ignite/transactions/transactions.h
- transactions.cpp