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

Go to the documentation of this file.
00001 #ifndef __GEMFIRE_CACHEABLEKEY_H__
00002 #define __GEMFIRE_CACHEABLEKEY_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 
00011 #include "gfcpp_globals.hpp"
00012 #include "gf_types.hpp"
00013 #include "Cacheable.hpp"
00014 
00019 namespace gemfire
00020 {
00021 
00023 class CPPCACHE_EXPORT CacheableKey
00024       : public Cacheable
00025 {
00026 
00027 protected:
00028 
00030   CacheableKey( )
00031 : Cacheable( )
00032   {}
00033 
00035   virtual ~CacheableKey( )
00036   {
00037   }
00038 
00039 public:
00040 
00042   virtual bool operator==( const CacheableKey& other ) const = 0;
00043 
00045   virtual uint32_t hashcode( ) const = 0;
00046 
00055   virtual int32_t logString( char* buffer, int32_t maxLength ) const;
00056 
00064   template< class PRIM >
00065   inline static CacheableKeyPtr create( const PRIM value );
00066 
00067 private:
00068 
00069   // Never defined.
00070   CacheableKey( const CacheableKey& other );
00071   void operator = ( const CacheableKey& other );
00072 
00073 };
00074 
00075 template <class TKEY>
00076 inline CacheableKeyPtr createKey( const SharedPtr< TKEY >& value );
00077 
00078 template <typename TKEY>
00079 inline CacheableKeyPtr createKey( const TKEY* value );
00080 
00081 }
00082 
00083 #endif

GemFire C++ Cache API Documentation