VMware GemFire Native C++ Reference  9.1
Cache.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef GEODE_CACHE_H_
4 #define GEODE_CACHE_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 #include "geode_globals.hpp"
23 #include "geode_types.hpp"
24 #include "GeodeCache.hpp"
25 #include "geode_types.hpp"
26 #include "Region.hpp"
27 #include "DistributedSystem.hpp"
28 #include "QueryService.hpp"
29 #include "PoolFactory.hpp"
30 #include "RegionShortcut.hpp"
31 #include "RegionFactory.hpp"
32 #include "InternalCacheTransactionManager2PC.hpp"
33 
38 namespace apache {
39 namespace geode {
40 namespace client {
41 
42 class CacheFactory;
43 class CacheRegionHelper;
44 class Pool;
45 
63  public:
72  virtual RegionFactoryPtr createRegionFactory(RegionShortcut regionShortcut);
73 
80  virtual void initializeDeclarativeCache(const char* cacheXml);
81 
85  virtual const char* getName() const;
86 
95  virtual bool isClosed() const;
96 
101  virtual DistributedSystemPtr getDistributedSystem() const;
102 
112  virtual void close();
113 
124  virtual void close(bool keepalive);
125 
136  virtual RegionPtr getRegion(const char* path);
137 
146  virtual void rootRegions(VectorOfRegion& regions);
147 
152  virtual QueryServicePtr getQueryService();
153 
161  virtual QueryServicePtr getQueryService(const char* poolName);
162 
166  virtual void readyForEvents();
167 
191  virtual RegionServicePtr createAuthenticatedView(
192  PropertiesPtr userSecurityProperties, const char* poolName = NULL);
193 
199  virtual CacheTransactionManagerPtr getCacheTransactionManager();
200 
204  virtual bool getPdxIgnoreUnreadFields();
205 
210  virtual bool getPdxReadSerialized();
211 
220  virtual PdxInstanceFactoryPtr createPdxInstanceFactory(const char* className);
221 
225  virtual ~Cache();
226 
227  private:
231  Cache(const char* name, DistributedSystemPtr sys, bool ignorePdxUnreadFields,
232  bool readPdxSerialized);
233  Cache(const char* name, DistributedSystemPtr sys, const char* id_data,
234  bool ignorePdxUnreadFields, bool readPdxSerialized);
235  CacheImpl* m_cacheImpl;
236 
237  protected:
238  Cache() { m_cacheImpl = NULL; }
239 
240  static bool isPoolInMultiuserMode(RegionPtr regionPtr);
241 
242  friend class CacheFactory;
243  friend class CacheRegionHelper;
244  friend class Pool;
245  friend class FunctionService;
246  friend class CacheXmlCreation;
247  friend class RegionXmlCreation;
248 };
249 } // namespace client
250 } // namespace geode
251 } // namespace apache
252 
253 #endif // GEODE_CACHE_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
A pool of connections to connect from a client to a set of Geode Cache Servers.
Definition: Pool.hpp:52
Top level class for configuring and using Geode on a client.This should be called once to create Cach...
Definition: CacheFactory.hpp:48
entry point for function execution
Definition: FunctionService.hpp:52
Defines a reference counted shared pointer.
Definition: SharedPtr.hpp:52
Vector template type class.
Definition: VectorT.hpp:37
This namespace contains all the Geode C++ API classes, enumerations and globals.
GeodeCache represents the singleton cache that must be created in order to connect to Geode server...
Definition: GeodeCache.hpp:47
Cache are obtained from create method on the CacheFactory#create class.
Definition: Cache.hpp:59

Pivotal GemFire C++ Cache API Documentation