H:/gfcppsancout/product/include/gfcpp/Cache.hpp

Go to the documentation of this file.
00001 #ifndef __GEMFIRE_CACHE_H__
00002 #define __GEMFIRE_CACHE_H__
00003 /*=========================================================================
00004  * (c) Copyright 2002-2007, GemStone Systems, Inc. All Rights Reserved.
00005  * 1260 NW Waterhouse Ave., Suite 200,  Beaverton, OR 97006
00006  *========================================================================
00007  */
00008 #include "gfcpp_globals.hpp"
00009 #include "gf_types.hpp"
00010 #include "Region.hpp"
00011 #include "DistributedSystem.hpp"
00012 #include "QueryService.hpp"
00013 #include "CacheRegionListener.hpp"
00014 
00019 namespace gemfire {
00020 
00021 class CacheFactory;
00022 class CacheRegionHelper;
00023 
00038 class CPPCACHE_EXPORT Cache : public SharedBase {
00042 public:
00043 
00047    void initializeDeclarativeCache(const char* cacheXml);
00048 
00052    const char*  getName() const;
00053 
00062    bool isClosed() const ;
00063 
00064 
00069    DistributedSystemPtr getDistributedSystem();
00070 
00079    void close(bool keepalive = false);
00080 
00100   RegionPtr createRegion(const char* name,
00101       const RegionAttributesPtr& aRegionAttributes);
00102 
00107    RegionPtr getRegion(const char* path);
00108 
00117    void rootRegions(VectorOfRegion& regions);
00118 
00124    void registerRegionListener(CacheRegionListenerPtr& listener);
00125 
00131    void deregisterRegionListener(CacheRegionListenerPtr& listener);
00132 
00138    QueryServicePtr getQueryService();
00139 
00143   void readyForEvents();
00144 
00148   virtual ~Cache();
00149 
00150 private:
00154   Cache(const char* name, DistributedSystemPtr sys );
00155   Cache(const char* name, DistributedSystemPtr sys, const char* id_data );
00156 
00157   CacheImpl*  m_cacheImpl;
00158 friend class CacheFactory;
00159 friend class CacheRegionHelper;
00160 };
00161 
00162 
00163 }; //namespace gemfire
00164 #endif //ifndef __GEMFIRE_CACHE_H__

GemFire C++ Cache API Documentation