Pivotal GemFire Native Client Cache Reference  9.0.6
DiskPolicyType.hpp
Go to the documentation of this file.
1 #ifndef __GEMFIRE_DISKPOLICYTYPE_H__
2 #define __GEMFIRE_DISKPOLICYTYPE_H__
3 /*=========================================================================
4  * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
5  * This product is protected by U.S. and international copyright
6  * and intellectual property laws. Pivotal products are covered by
7  * more patents listed at http://www.pivotal.io/patents.
8  *========================================================================
9  */
10 
14 #include "gfcpp_globals.hpp"
15 
16 namespace gemfire {
24  // public static methods
25  public:
29  typedef enum {
30  NONE = 0,
31  OVERFLOWS,
32  PERSIST
33  } PolicyType;
34 
35 
37  static const char* fromOrdinal(const uint8_t ordinal) ;
38 
40  static PolicyType fromName(const char* name) ;
41 
45  inline static bool isOverflow(const PolicyType type)
46  {
47  return (type == DiskPolicyType::OVERFLOWS);
48  }
49 
51  inline static bool isNone(const PolicyType type )
52  {
53  return (type == DiskPolicyType::NONE);
54  }
56  inline static bool isPersist(const PolicyType type )
57  {
58  return (type == DiskPolicyType::PERSIST);
59  }
60  private:
62  DiskPolicyType() {};
63  static const char * names[];
64 };
65 } //namespace gemfire
66 #endif //ifndef __GEMFIRE_DISKPOLICYTYPE_H__
static bool isNone(const PolicyType type)
Return whether this is NONE.
Definition: DiskPolicyType.hpp:51
Enumerated type for disk policy.
Definition: DiskPolicyType.hpp:23
static bool isPersist(const PolicyType type)
Return whether this is persist.
Definition: DiskPolicyType.hpp:56
This namespace contains all the GemFire C++ API classes, enumerations and globals.
Definition: Assert.hpp:19
#define CPPCACHE_EXPORT
Defines a GemFire CPPCACHE export.
Definition: gf_base.hpp:51
PolicyType
Values for setting PolicyType.
Definition: DiskPolicyType.hpp:29
static bool isOverflow(const PolicyType type)
Returns whether this is one of the overflow to disk type.
Definition: DiskPolicyType.hpp:45

GemFire C++ Cache API Documentation