VMware GemFire Native C++ Reference  9.1
CacheTransactionManager.hpp
1 #pragma once
2 
3 #ifndef GEODE_CACHETRANSACTIONMANAGER_H_
4 #define GEODE_CACHETRANSACTIONMANAGER_H_
5 
6 /*
7  * Licensed to the Apache Software Foundation (ASF) under one or more
8  * contributor license agreements. See the NOTICE file distributed with
9  * this work for additional information regarding copyright ownership.
10  * The ASF licenses this file to You under the Apache License, Version 2.0
11  * (the "License"); you may not use this file except in compliance with
12  * the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  */
22 
23 /* The specification of function behaviors is found in the corresponding .cpp
24  * file.
25  */
26 
27 //#### Warning: DO NOT directly include Region.hpp, include Cache.hpp instead.
28 
29 #include "geode_globals.hpp"
30 #include "geode_types.hpp"
31 
32 namespace apache {
33 namespace geode {
34 namespace client {
35 
36 class CPPCACHE_EXPORT CacheTransactionManager
38  public:
46  virtual void begin() = 0;
47 
75  virtual void commit() = 0;
76 
86  virtual void rollback() = 0;
87 
97  virtual TransactionIdPtr suspend() = 0;
98 
111  virtual void resume(TransactionIdPtr transactionId) = 0;
112 
123  virtual bool isSuspended(TransactionIdPtr transactionId) = 0;
124 
142  virtual bool tryResume(TransactionIdPtr transactionId) = 0;
143 
165  virtual bool tryResume(TransactionIdPtr transactionId,
166  int32_t waitTimeInMilliSec) = 0;
167 
179  virtual bool exists(TransactionIdPtr transactionId) = 0;
180 
187  virtual TransactionIdPtr getTransactionId() = 0;
188 
195  virtual bool exists() = 0;
196 
197  protected:
198  CacheTransactionManager();
199  virtual ~CacheTransactionManager();
200 };
201 } // namespace client
202 } // namespace geode
203 } // namespace apache
204 
205 #endif // GEODE_CACHETRANSACTIONMANAGER_H_
Each enum represents a predefined RegionAttributes in a Cache.
Definition: Assert.hpp:31
#define CPPCACHE_EXPORT
Defines a Geode CPPCACHE export.
Definition: geode_base.hpp:58
This abstract base class is the base class of all user objects that have the shared capability of ref...
Definition: SharedBase.hpp:40
This namespace contains all the Geode C++ API classes, enumerations and globals.

Pivotal GemFire C++ Cache API Documentation