build-artifacts/win/product/include/gfcpp/DiskPolicyType.hpp

Go to the documentation of this file.
00001 #ifndef __GEMFIRE_DISKPOLICYTYPE_H__
00002 #define __GEMFIRE_DISKPOLICYTYPE_H__
00003 /*=========================================================================
00004  * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
00005  * This product is protected by U.S. and international copyright
00006  * and intellectual property laws. Pivotal products are covered by
00007  * more patents listed at http://www.pivotal.io/patents.
00008  *========================================================================
00009  */
00010 
00014 #include "gfcpp_globals.hpp"
00015 
00016 namespace gemfire {
00023 class CPPCACHE_EXPORT DiskPolicyType {
00024      // public static methods
00025  public:   
00029     typedef enum {
00030       NONE = 0,
00031       OVERFLOWS,
00032       PERSIST
00033     } PolicyType;
00034 
00035     
00037     static const char* fromOrdinal(const uint8_t ordinal) ;
00038 
00040     static  PolicyType fromName(const char* name) ;
00041     
00045     inline static bool isOverflow(const PolicyType type) 
00046     {
00047        return (type == DiskPolicyType::OVERFLOWS);
00048     }
00049     
00051     inline static bool isNone(const PolicyType type )
00052     {
00053       return (type == DiskPolicyType::NONE);
00054     }
00056     inline static bool isPersist(const PolicyType type )
00057     {
00058       return (type == DiskPolicyType::PERSIST);
00059     }
00060     private:
00062     DiskPolicyType() {};
00063     static const char * names[];
00064 };
00065 } //namespace gemfire
00066 #endif //ifndef __GEMFIRE_DISKPOLICYTYPE_H__

GemFire C++ Cache API Documentation