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

Go to the documentation of this file.
00001 #ifndef __GEMFIRE_PERSISTENCEMANAGER_H__
00002 #define __GEMFIRE_PERSISTENCEMANAGER_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 "DistributedSystem.hpp"
00013 #include "ExceptionTypes.hpp"
00014 #include "CacheableKey.hpp"
00015 #include "Cacheable.hpp"
00016 
00021 #define MAX_PAGE_COUNT "MaxPageCount"
00022 #define PAGE_SIZE "PageSize"
00023 #define PERSISTENCE_DIR "PersistenceDirectory"
00024 
00025 namespace gemfire {
00026 
00027 
00028 typedef PersistenceManagerPtr (*getPersistenceManagerInstance) (const RegionPtr&);
00029 
00036 class CPPCACHE_EXPORT PersistenceManager: public SharedBase  {
00040 public:
00041 
00042 
00047    static PersistenceManagerPtr getPersistenceManager();
00048 
00059    virtual void write(const CacheableKeyPtr&  key, const CacheablePtr&  value, void *& PersistenceInfo)=0;
00060 
00061 
00066    virtual bool writeAll()=0;
00067 
00073    virtual void init(const RegionPtr& region, PropertiesPtr& diskProperties)=0;
00074 
00075 
00083    virtual CacheablePtr read(const CacheableKeyPtr& key, void *& PersistenceInfo)=0;
00084 
00085 
00090   virtual bool readAll()=0;
00091 
00092 
00100   virtual void destroy(const CacheableKeyPtr& key, void *& PersistenceInfo)=0;
00101 
00106   virtual void close()=0;
00107 
00108   PersistenceManager(const RegionPtr& regionPtr); 
00109   PersistenceManager();
00113   virtual ~PersistenceManager() = 0; 
00114 protected:
00117   const RegionPtr m_regionPtr;   
00118 
00119 };
00120 
00121 }; //namespace gemfire
00122 #endif //ifndef __GEMFIRE_PERSISTENCEMANAGER_H__

GemFire C++ Cache API Documentation