VMware GemFire Native C++ Reference  9.1
DiskPolicyType.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef GEODE_DISKPOLICYTYPE_H_
4 #define GEODE_DISKPOLICYTYPE_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 
26 #include "geode_globals.hpp"
27 
28 namespace apache {
29 namespace geode {
30 namespace client {
38  // public static methods
39  public:
43  typedef enum { NONE = 0, OVERFLOWS, PERSIST } PolicyType;
44 
46  static const char* fromOrdinal(const uint8_t ordinal);
47 
49  static PolicyType fromName(const char* name);
50 
54  inline static bool isOverflow(const PolicyType type) {
55  return (type == DiskPolicyType::OVERFLOWS);
56  }
57 
59  inline static bool isNone(const PolicyType type) {
60  return (type == DiskPolicyType::NONE);
61  }
63  inline static bool isPersist(const PolicyType type) {
64  return (type == DiskPolicyType::PERSIST);
65  }
66 
67  private:
69  DiskPolicyType(){};
70  static const char* names[];
71 };
72 } // namespace client
73 } // namespace geode
74 } // namespace apache
75 
76 #endif // GEODE_DISKPOLICYTYPE_H_
PolicyType
Values for setting PolicyType.
Definition: DiskPolicyType.hpp:43
static bool isNone(const PolicyType type)
Return whether this is NONE.
Definition: DiskPolicyType.hpp:59
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
Enumerated type for disk policy.
Definition: DiskPolicyType.hpp:37
static bool isPersist(const PolicyType type)
Return whether this is persist.
Definition: DiskPolicyType.hpp:63
static bool isOverflow(const PolicyType type)
Returns whether this is one of the overflow to disk type.
Definition: DiskPolicyType.hpp:54
This namespace contains all the Geode C++ API classes, enumerations and globals.

Pivotal GemFire C++ Cache API Documentation