Apache Ignite C++
transactions.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
23 #ifndef _IGNITE_TRANSACTIONS_TRANSACTIONS
24 #define _IGNITE_TRANSACTIONS_TRANSACTIONS
25 
26 #include <ignite/common/concurrent.h>
27 #include <ignite/jni/java.h>
28 
31 #include "ignite/impl/transactions/transactions_impl.h"
32 
33 namespace ignite
34 {
35  namespace transactions
36  {
45  class IGNITE_FRIEND_EXPORT Transactions
46  {
47  public:
55  Transactions(ignite::common::concurrent::SharedPointer<impl::transactions::TransactionsImpl> impl);
56 
62  Transactions(const Transactions& other);
63 
70  Transactions& operator=(const Transactions& other);
71 
75  ~Transactions();
76 
84  Transaction GetTx();
85 
92  Transaction TxStart();
93 
101  Transaction TxStart(IgniteError& err);
102 
111  Transaction TxStart(TransactionConcurrency concurrency,
112  TransactionIsolation isolation);
113 
123  Transaction TxStart(TransactionConcurrency concurrency,
124  TransactionIsolation isolation, IgniteError& err);
125 
137  Transaction TxStart(TransactionConcurrency concurrency,
138  TransactionIsolation isolation, int64_t timeout,
139  int32_t txSize);
140 
152  Transaction TxStart(TransactionConcurrency concurrency,
153  TransactionIsolation isolation, int64_t timeout,
154  int32_t txSize, IgniteError& err);
155 
161  TransactionMetrics GetMetrics();
162 
171  TransactionMetrics GetMetrics(IgniteError& err);
172 
173  private:
175  ignite::common::concurrent::SharedPointer<impl::transactions::TransactionsImpl> impl;
176  };
177  }
178 }
179 
180 #endif //_IGNITE_TRANSACTIONS_TRANSACTIONS
TransactionConcurrency
Transaction concurrency control model.
Definition: transaction_consts.h:33
TransactionIsolation
Defines different cache transaction isolation levels.
Definition: transaction_consts.h:68
Declares ignite::transactions::TransactionMetrics class.
Ignite cache transaction.
Definition: transaction.h:47
Transactions facade.
Definition: transactions.h:45
Transaction metrics, shared across all caches.
Definition: transaction_metrics.h:37
Ignite error information.
Definition: ignite_error.h:89
Apache Ignite API.
Definition: cache.h:43
Declares ignite::transactions::Transaction class.