GridGain C++
thin-client/include/ignite/thin/transactions/transaction.h
1 /*
2  * Copyright 2019 GridGain Systems, Inc. and Contributors.
3  *
4  * Licensed under the GridGain Community Edition License (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef _IGNITE_THIN_TRANSACTIONS_CLIENT_TRANSACTION
18 #define _IGNITE_THIN_TRANSACTIONS_CLIENT_TRANSACTION
19 
20 #include <ignite/impl/thin/transactions/transactions_proxy.h>
21 
22 namespace ignite
23 {
24  namespace thin
25  {
26  namespace transactions
27  {
38 
39  public:
45  ClientTransaction(ignite::impl::thin::transactions::TransactionProxy impl) :
46  proxy(impl)
47  {
48  // No-op.
49  }
50 
55  {
56  // No-op.
57  }
58 
63  {
64  // No-op.
65  }
66 
70  void Commit()
71  {
72  proxy.commit();
73  }
74 
78  void Rollback()
79  {
80  proxy.rollback();
81  }
82 
86  void Close()
87  {
88  proxy.close();
89  }
90 
91  private:
93  ignite::impl::thin::transactions::TransactionProxy proxy;
94  };
95  }
96  }
97 }
98 
99 #endif // _IGNITE_THIN_TRANSACTIONS_CLIENT_TRANSACTION
ignite
Ignite API.
Definition: cache.h:47
ignite::thin::transactions::ClientTransaction::ClientTransaction
ClientTransaction()
Default constructor.
Definition: thin-client/include/ignite/thin/transactions/transaction.h:54
ignite::thin::transactions::ClientTransaction::Close
void Close()
Ends the transaction.
Definition: thin-client/include/ignite/thin/transactions/transaction.h:86
ignite::thin::transactions::ClientTransaction::~ClientTransaction
~ClientTransaction()
Destructor.
Definition: thin-client/include/ignite/thin/transactions/transaction.h:62
ignite::thin::transactions::ClientTransaction::ClientTransaction
ClientTransaction(ignite::impl::thin::transactions::TransactionProxy impl)
Constructor.
Definition: thin-client/include/ignite/thin/transactions/transaction.h:45
ignite::thin::transactions::ClientTransaction::Rollback
void Rollback()
Rolls back this transaction.
Definition: thin-client/include/ignite/thin/transactions/transaction.h:78
ignite::thin::transactions::ClientTransaction::Commit
void Commit()
Commits this transaction.
Definition: thin-client/include/ignite/thin/transactions/transaction.h:70
ignite::thin::transactions::ClientTransaction
Transaction client.
Definition: thin-client/include/ignite/thin/transactions/transaction.h:37