VMware GemFire Native Client Cache Reference  9.0.6
Cache.hpp
Go to the documentation of this file.
1 #ifndef __GEMFIRE_CACHE_H__
2 #define __GEMFIRE_CACHE_H__
3 /*=========================================================================
4  * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
5  * This product is protected by U.S. and international copyright
6  * and intellectual property laws. Pivotal products are covered by
7  * more patents listed at http://www.pivotal.io/patents.
8  *========================================================================
9  */
10 #include "gfcpp_globals.hpp"
11 #include "gf_types.hpp"
12 #include "GemFireCache.hpp"
13 #include "gf_types.hpp"
14 #include "Region.hpp"
15 #include "DistributedSystem.hpp"
16 #include "QueryService.hpp"
17 #include "PoolFactory.hpp"
18 #include "RegionShortcut.hpp"
19 #include "RegionFactory.hpp"
20 #include "InternalCacheTransactionManager2PC.hpp"
21 
26 namespace gemfire {
27 
28 class CacheFactory;
29 class CacheRegionHelper;
30 class Pool;
31 
48 public:
49 
57  virtual RegionFactoryPtr createRegionFactory(RegionShortcut regionShortcut);
58 
65  virtual void initializeDeclarativeCache(const char* cacheXml);
66 
70  virtual const char* getName() const;
71 
80  virtual bool isClosed() const ;
81 
82 
87  virtual DistributedSystemPtr getDistributedSystem() const;
88 
97  virtual void close();
98 
108  virtual void close(bool keepalive);
109 
134  virtual RegionPtr createRegion(const char* name,
135  const RegionAttributesPtr& aRegionAttributes);
136 
145  virtual RegionPtr getRegion(const char* path);
146 
155  virtual void rootRegions(VectorOfRegion& regions);
156 
161  virtual QueryServicePtr getQueryService();
162 
169  virtual QueryServicePtr getQueryService(const char* poolName);
170 
174  virtual void readyForEvents();
175 
198  virtual RegionServicePtr createAuthenticatedView(PropertiesPtr userSecurityProperties, const char* poolName = NULL);
199 
205  virtual CacheTransactionManagerPtr getCacheTransactionManager();
206 
210  virtual bool getPdxIgnoreUnreadFields();
211 
215  virtual bool getPdxReadSerialized();
216 
224  virtual PdxInstanceFactoryPtr createPdxInstanceFactory(const char* className);
225 
229  virtual ~Cache();
230 
231 private:
235  Cache(const char* name, DistributedSystemPtr sys, bool ignorePdxUnreadFields, bool readPdxSerialized );
236  Cache(const char* name, DistributedSystemPtr sys, const char* id_data, bool ignorePdxUnreadFields, bool readPdxSerialized );
237  CacheImpl* m_cacheImpl;
238 
239 protected:
240  Cache()
241  {
242  m_cacheImpl = NULL;
243  }
244 
245  static bool isPoolInMultiuserMode(RegionPtr regionPtr);
246 
247 
248 friend class CacheFactory;
249 friend class CacheRegionHelper;
250 friend class Pool;
251 friend class FunctionService;
252 friend class CacheXmlCreation;
253 friend class RegionXmlCreation;
254 };
255 
256 
257 }; //namespace gemfire
258 #endif //ifndef __GEMFIRE_CACHE_H__
Top level class for configuring and using GemFire on a client.This should be called once to create Ca...
Definition: CacheFactory.hpp:33
GemFireCache represents the singleton cache that must be created in order to connect to Gemfire serve...
Definition: GemFireCache.hpp:33
Vector template type class.
Definition: VectorT.hpp:24
A pool of connections to connect from a client to a set of GemFire Cache Servers. ...
Definition: Pool.hpp:38
This namespace contains all the GemFire C++ API classes, enumerations and globals.
Definition: Assert.hpp:19
entry point for function execution
Definition: FunctionService.hpp:37
RegionShortcut
Definition: RegionShortcut.hpp:24
#define CPPCACHE_EXPORT
Defines a GemFire CPPCACHE export.
Definition: gf_base.hpp:51
Cache are obtained from create method on the CacheFactory#create class.
Definition: Cache.hpp:44
Defines a reference counted shared pointer.
Definition: SharedPtr.hpp:35

GemFire C++ Cache API Documentation