Apache Geode Native C++ Reference 1.15.0
apache::geode::client::CacheableFileName Class Reference

Implements an immutable wrapper for filenames that can serve as a distributable filename object for caching as both key and value. More...

#include <CacheableFileName.hpp>

Inherits apache::geode::client::CacheableString.

Public Member Functions

virtual int32_t hashcode () const override
 return the hashcode for this key. More...
 
std::string::size_type length () const
 Return the length of the contained string. More...
 
virtual size_t objectSize () const override
 return the size in bytes of the instance being serialized. More...
 
virtual bool operator== (const CacheableKey &other) const override
 return true if this key matches other. More...
 
virtual std::string toString () const override
 Display this object as 'string', which depends on the implementation in the subclasses. More...
 

Static Public Member Functions

template<class _T >
static std::shared_ptr< CacheableKeycreate (_T value)
 Factory method that creates the key type that matches the type of value. More...
 
static std::shared_ptr< CacheableFileNamecreate (const std::string &value)
 Factory method for creating an instance of CacheableFileName from a C string optionally given the length. More...
 
static std::shared_ptr< SerializablecreateDeserializable ()
 creation function for filenames. More...
 
static std::shared_ptr< SerializablecreateDeserializableHuge ()
 creation function for strings > 64K length More...
 
static std::shared_ptr< SerializablecreateUTFDeserializable ()
 creation function for wide strings More...
 
static std::shared_ptr< SerializablecreateUTFDeserializableHuge ()
 creation function for wide strings > 64K length in UTF8 encoding More...
 

Detailed Description

Implements an immutable wrapper for filenames that can serve as a distributable filename object for caching as both key and value.

Member Function Documentation

◆ create() [1/2]

template<class _T >
static std::shared_ptr< CacheableKey > apache::geode::client::CacheableKey::create ( _T  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.

◆ create() [2/2]

static std::shared_ptr< CacheableFileName > apache::geode::client::CacheableFileName::create ( const std::string &  value)
inlinestatic

Factory method for creating an instance of CacheableFileName from a C string optionally given the length.

◆ createDeserializable()

static std::shared_ptr< Serializable > apache::geode::client::CacheableFileName::createDeserializable ( )
inlinestatic

creation function for filenames.

◆ createDeserializableHuge()

static std::shared_ptr< Serializable > apache::geode::client::CacheableString::createDeserializableHuge ( )
staticinherited

creation function for strings > 64K length

◆ createUTFDeserializable()

static std::shared_ptr< Serializable > apache::geode::client::CacheableString::createUTFDeserializable ( )
staticinherited

creation function for wide strings

◆ createUTFDeserializableHuge()

static std::shared_ptr< Serializable > apache::geode::client::CacheableString::createUTFDeserializableHuge ( )
staticinherited

creation function for wide strings > 64K length in UTF8 encoding

◆ hashcode()

virtual int32_t apache::geode::client::CacheableFileName::hashcode ( ) const
overridevirtual

return the hashcode for this key.

Reimplemented from apache::geode::client::CacheableString.

◆ length()

std::string::size_type apache::geode::client::CacheableString::length ( ) const
inlineinherited

Return the length of the contained string.

◆ objectSize()

virtual size_t apache::geode::client::CacheableString::objectSize ( ) const
overridevirtualinherited

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.

◆ operator==()

virtual bool apache::geode::client::CacheableString::operator== ( const CacheableKey other) const
overridevirtualinherited

return true if this key matches other.

Implements apache::geode::client::CacheableKey.

◆ toString()

virtual std::string apache::geode::client::CacheableString::toString ( ) const
overridevirtualinherited

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.


Apache Geode C++ Cache API Documentation