00001 #ifndef __GEMFIRE_CACHEATTRIBUTES_H__
00002 #define __GEMFIRE_CACHEATTRIBUTES_H__
00003
00004
00005
00006
00007
00008
00009
00010
00015 #include "gfcpp_globals.hpp"
00016 #include "gf_types.hpp"
00017
00018 namespace gemfire {
00019
00035 class CacheAttributesFactory;
00036
00037 _GF_PTR_DEF_(CacheAttributes, CacheAttributesPtr);
00038
00039 class CPPCACHE_EXPORT CacheAttributes : public SharedBase {
00040
00044 public:
00045
00049 int getRedundancyLevel();
00050
00054 char *getEndpoints();
00055
00056 ~CacheAttributes();
00057
00058 bool operator == ( const CacheAttributes& other ) const;
00059
00060 bool operator != ( const CacheAttributes& other ) const;
00061
00062 private:
00063
00067 void setRedundancyLevel(int redundancyLevel);
00068
00072 void setEndpoints(char *endpoints);
00073
00074
00075 CacheAttributes(const CacheAttributes& rhs);
00076 CacheAttributes();
00077
00078 int32_t compareStringAttribute(char* attributeA, char* attributeB) const;
00079 void copyStringAttribute( char*& lhs, const char* rhs);
00080
00081 int m_redundancyLevel;
00082 char* m_endpoints;
00083 bool m_cacheMode;
00084
00085 friend class CacheAttributesFactory;
00086 friend class CacheImpl;
00087
00088 const CacheAttributes& operator=( const CacheAttributes& );
00089
00090 };
00091
00092 }
00093
00094 #endif //ifndef __GEMFIRE_CACHEATTRIBUTES_H__