VMware GemFire Native Client Cache Reference  9.0.6
CacheableKey.hpp
Go to the documentation of this file.
1 #ifndef __GEMFIRE_CACHEABLEKEY_H__
2 #define __GEMFIRE_CACHEABLEKEY_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 
11 #include "gfcpp_globals.hpp"
12 #include "gf_types.hpp"
13 #include "Cacheable.hpp"
14 
19 namespace gemfire
20 {
21 
24  : public Cacheable
25 {
26 
27 protected:
28 
31 : Cacheable( )
32  {}
33 
35  virtual ~CacheableKey( )
36  {
37  }
38 
39 public:
40 
42  virtual bool operator==( const CacheableKey& other ) const = 0;
43 
45  virtual uint32_t hashcode( ) const = 0;
46 
55  virtual int32_t logString( char* buffer, int32_t maxLength ) const;
56 
64  template< class PRIM >
65  inline static CacheableKeyPtr create( const PRIM value );
66 
67 private:
68 
69  // Never defined.
70  CacheableKey( const CacheableKey& other );
71  void operator = ( const CacheableKey& other );
72 
73 };
74 
75 template <class TKEY>
76 inline CacheableKeyPtr createKey( const SharedPtr< TKEY >& value );
77 
78 template <typename TKEY>
79 inline CacheableKeyPtr createKey( const TKEY* value );
80 
81 }
82 
83 #endif
Represents a cacheable key.
Definition: CacheableKey.hpp:23
This namespace contains all the GemFire C++ API classes, enumerations and globals.
Definition: Assert.hpp:19
virtual ~CacheableKey()
Destructor.
Definition: CacheableKey.hpp:35
This abstract base class is the superclass of all user objects in the cache that can be serialized...
Definition: Serializable.hpp:39
#define CPPCACHE_EXPORT
Defines a GemFire CPPCACHE export.
Definition: gf_base.hpp:51
CacheableKey()
Constructor.
Definition: CacheableKey.hpp:30

GemFire C++ Cache API Documentation