/export/loot1/users/build/gfcppsancout/product/include/gfcpp/PersistenceManager.hpp

Go to the documentation of this file.
00001 #ifndef __GEMFIRE_PERSISTENCEMANAGER_H__
00002 #define __GEMFIRE_PERSISTENCEMANAGER_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 "DistributedSystem.hpp"
00011 #include "ExceptionTypes.hpp"
00012 #include "CacheableKey.hpp"
00013 #include "Cacheable.hpp"
00014 
00019 namespace gemfire {
00020 
00021 
00022 typedef PersistenceManagerPtr (*getPersistenceManagerInstance) (const RegionPtr&);
00023 
00030 class CPPCACHE_EXPORT PersistenceManager: public SharedBase  {
00034 public:
00035 
00036 
00041    static PersistenceManagerPtr getPersistenceManager();
00042 
00053    virtual void write(const CacheableKeyPtr&  key, const CacheablePtr&  value, void *& PersistenceInfo)=0;
00054 
00055 
00060    virtual bool writeAll()=0;
00061 
00067    virtual void init(const RegionPtr& region, PropertiesPtr& diskProperties)=0;
00068 
00069 
00077    virtual CacheablePtr read(const CacheableKeyPtr& key, void *& PersistenceInfo)=0;
00078 
00079 
00084   virtual bool readAll()=0;
00085 
00086 
00094   virtual void destroy(const CacheableKeyPtr& key, void *& PersistenceInfo)=0;
00095 
00100   virtual void close()=0;
00101 
00102   PersistenceManager(const RegionPtr& regionPtr); 
00103   PersistenceManager();
00107   virtual ~PersistenceManager() = 0; 
00108 protected:
00111   const RegionPtr m_regionPtr;   
00112 
00113 };
00114 
00115 }; //namespace gemfire
00116 #endif //ifndef __GEMFIRE_PERSISTENCEMANAGER_H__

GemFire C++ Cache API Documentation