VMware GemFire Native C++ Reference  9.1
PersistenceManager.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef GEODE_PERSISTENCEMANAGER_H_
4 #define GEODE_PERSISTENCEMANAGER_H_
5 
6 /*
7  * Licensed to the Apache Software Foundation (ASF) under one or more
8  * contributor license agreements. See the NOTICE file distributed with
9  * this work for additional information regarding copyright ownership.
10  * The ASF licenses this file to You under the Apache License, Version 2.0
11  * (the "License"); you may not use this file except in compliance with
12  * the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  */
22 #include "geode_globals.hpp"
23 #include "geode_types.hpp"
24 #include "DistributedSystem.hpp"
25 #include "ExceptionTypes.hpp"
26 #include "CacheableKey.hpp"
27 #include "Cacheable.hpp"
28 
33 #define MAX_PAGE_COUNT "MaxPageCount"
34 #define PAGE_SIZE "PageSize"
35 #define PERSISTENCE_DIR "PersistenceDirectory"
36 
37 namespace apache {
38 namespace geode {
39 namespace client {
40 
41 typedef PersistenceManagerPtr (*getPersistenceManagerInstance)(
42  const RegionPtr&);
43 
56  public:
61  static PersistenceManagerPtr getPersistenceManager();
62 
74  virtual void write(const CacheableKeyPtr& key, const CacheablePtr& value,
75  void*& PersistenceInfo) = 0;
76 
82  virtual bool writeAll() = 0;
83 
91  virtual void init(const RegionPtr& region, PropertiesPtr& diskProperties) = 0;
92 
100  virtual CacheablePtr read(const CacheableKeyPtr& key,
101  void*& PersistenceInfo) = 0;
102 
107  virtual bool readAll() = 0;
108 
116  virtual void destroy(const CacheableKeyPtr& key, void*& PersistenceInfo) = 0;
117 
122  virtual void close() = 0;
123 
124  PersistenceManager(const RegionPtr& regionPtr);
129  virtual ~PersistenceManager() = 0;
130 
131  protected:
135 };
136 } // namespace client
137 } // namespace geode
138 } // namespace apache
139 
140 #endif // GEODE_PERSISTENCEMANAGER_H_
const RegionPtr m_regionPtr
Region for this persistence manager.
Definition: PersistenceManager.hpp:134
Each enum represents a predefined RegionAttributes in a Cache.
Definition: Assert.hpp:31
#define CPPCACHE_EXPORT
Defines a Geode CPPCACHE export.
Definition: geode_base.hpp:58
PersistenceManager API for persistence and overflow.
Definition: PersistenceManager.hpp:52
This abstract base class is the base class of all user objects that have the shared capability of ref...
Definition: SharedBase.hpp:40
This namespace contains all the Geode C++ API classes, enumerations and globals.

Pivotal GemFire C++ Cache API Documentation