00001 #ifndef __GEMFIRE_DISKPOLICYTYPE_H__
00002 #define __GEMFIRE_DISKPOLICYTYPE_H__
00003
00004
00005
00006
00007
00008
00012 #include "gfcpp_globals.hpp"
00013
00014 namespace gemfire {
00021 class CPPCACHE_EXPORT DiskPolicyType {
00022
00023 public:
00027 typedef enum {
00028 NONE = 0,
00029 OVERFLOWS,
00030 PERSIST
00031 } PolicyType;
00032
00033
00035 static const char* fromOrdinal(const uint8_t ordinal) ;
00036
00038 static PolicyType fromName(const char* name) ;
00039
00043 inline static bool isOverflow(const PolicyType type)
00044 {
00045 return (type == DiskPolicyType::OVERFLOWS);
00046 }
00047
00049 inline static bool isNone(const PolicyType type )
00050 {
00051 return (type == DiskPolicyType::NONE);
00052 }
00054 inline static bool isPersist(const PolicyType type )
00055 {
00056 return (type == DiskPolicyType::PERSIST);
00057 }
00058 private:
00060 DiskPolicyType() {};
00061 static const char * names[];
00062 };
00063 }
00064 #endif //ifndef __GEMFIRE_DISKPOLICYTYPE_H__