VMware VMware GemFire Native C++ Reference 10.4.3
|
Implement a immutable C string wrapper that can serve as a distributable key object for caching as well as being a string value. More...
#include <CacheableString.hpp>
Inherits internal::DataSerializablePrimitive, and apache::geode::client::CacheableKey.
Inherited by apache::geode::client::CacheableFileName.
Public Member Functions | |
virtual int32_t | hashcode () const override |
return the hashcode for this key. | |
std::string::size_type | length () const |
Return the length of the contained string. | |
virtual size_t | objectSize () const override |
return the size in bytes of the instance being serialized. | |
virtual bool | operator== (const CacheableKey &other) const override |
return true if this key matches other. | |
virtual std::string | toString () const override |
Display this object as 'string', which depends on the implementation in the subclasses. | |
Static Public Member Functions | |
template<class _T > | |
static std::shared_ptr< CacheableKey > | create (_T value) |
Factory method that creates the key type that matches the type of value. | |
static std::shared_ptr< Serializable > | createDeserializable () |
creation function for strings | |
static std::shared_ptr< Serializable > | createDeserializableHuge () |
creation function for strings > 64K length | |
static std::shared_ptr< Serializable > | createUTFDeserializable () |
creation function for wide strings | |
static std::shared_ptr< Serializable > | createUTFDeserializableHuge () |
creation function for wide strings > 64K length in UTF8 encoding | |
Implement a immutable C string wrapper that can serve as a distributable key object for caching as well as being a string value.
|
staticinherited |
Factory method that creates the key type that matches the type of value.
For user defined derivations of CacheableKey, the method apache::geode::client::CacheableKey::create may be overloaded.
|
static |
creation function for strings
|
static |
creation function for strings > 64K length
|
static |
creation function for wide strings
|
static |
creation function for wide strings > 64K length in UTF8 encoding
|
overridevirtual |
return the hashcode for this key.
Implements apache::geode::client::CacheableKey.
Reimplemented in apache::geode::client::CacheableFileName.
|
inline |
Return the length of the contained string.
|
overridevirtual |
return the size in bytes of the instance being serialized.
This is used to determine whether the cache is using up more physical memory than it has been configured to use. The method can return zero if the user does not require the ability to control cache memory utilization. Note that you must implement this only if you use the HeapLRU feature.
Reimplemented from apache::geode::client::Serializable.
|
overridevirtual |
return true if this key matches other.
Implements apache::geode::client::CacheableKey.
|
overridevirtual |
Display this object as 'string', which depends on the implementation in the subclasses.
The default implementation renders the classname.
Reimplemented from apache::geode::client::Serializable.