build-artifacts/win/product/include/gfcpp/Cache.hpp

Go to the documentation of this file.
00001 #ifndef __GEMFIRE_CACHE_H__
00002 #define __GEMFIRE_CACHE_H__
00003 /*=========================================================================
00004  * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
00005  * This product is protected by U.S. and international copyright
00006  * and intellectual property laws. Pivotal products are covered by
00007  * more patents listed at http://www.pivotal.io/patents.
00008  *========================================================================
00009  */
00010 #include "gfcpp_globals.hpp"
00011 #include "gf_types.hpp"
00012 #include "GemFireCache.hpp"
00013 #include "gf_types.hpp"
00014 #include "Region.hpp"
00015 #include "DistributedSystem.hpp"
00016 #include "QueryService.hpp"
00017 #include "PoolFactory.hpp"
00018 #include "RegionShortcut.hpp"
00019 #include "RegionFactory.hpp"
00020 #include "InternalCacheTransactionManager2PC.hpp"
00021 
00026 namespace gemfire {  
00027 
00028 class CacheFactory;
00029 class CacheRegionHelper;
00030 class Pool;
00031 
00044 class CPPCACHE_EXPORT Cache : public GemFireCache {
00048 public:
00049   
00057    virtual RegionFactoryPtr createRegionFactory(RegionShortcut regionShortcut);
00058   
00065    virtual void initializeDeclarativeCache(const char* cacheXml);
00066 
00070    virtual const char*  getName() const;
00071 
00080    virtual bool isClosed() const ;
00081 
00082 
00087    virtual DistributedSystemPtr getDistributedSystem() const;
00088 
00097    virtual void close();
00098 
00108    virtual void close(bool keepalive);
00109 
00134   virtual RegionPtr createRegion(const char* name,
00135       const RegionAttributesPtr& aRegionAttributes);
00136 
00145    virtual RegionPtr getRegion(const char* path);
00146 
00155    virtual void rootRegions(VectorOfRegion& regions);
00156 
00161    virtual QueryServicePtr getQueryService();
00162 
00169    virtual QueryServicePtr getQueryService(const char* poolName);
00170 
00174   virtual void readyForEvents();
00175 
00198   virtual RegionServicePtr createAuthenticatedView(PropertiesPtr userSecurityProperties,  const char* poolName = NULL);
00199 
00205   virtual CacheTransactionManagerPtr getCacheTransactionManager();
00206 
00210   virtual bool getPdxIgnoreUnreadFields();
00211 
00215   virtual bool getPdxReadSerialized();
00216 
00224   virtual PdxInstanceFactoryPtr createPdxInstanceFactory(const char* className); 
00225 
00229   virtual ~Cache();
00230 
00231 private:
00235   Cache(const char* name, DistributedSystemPtr sys, bool ignorePdxUnreadFields, bool readPdxSerialized );
00236   Cache(const char* name, DistributedSystemPtr sys, const char* id_data, bool ignorePdxUnreadFields, bool readPdxSerialized );
00237   CacheImpl*  m_cacheImpl;
00238   
00239 protected:  
00240   Cache()
00241   {
00242     m_cacheImpl = NULL;
00243   }
00244 
00245   static bool isPoolInMultiuserMode(RegionPtr regionPtr);
00246 
00247   
00248 friend class CacheFactory;
00249 friend class CacheRegionHelper;
00250 friend class Pool;
00251 friend class FunctionService;
00252 friend class CacheXmlCreation;
00253 friend class RegionXmlCreation;
00254 };
00255 
00256 
00257 }; //namespace gemfire
00258 #endif //ifndef __GEMFIRE_CACHE_H__

GemFire C++ Cache API Documentation