VMware Tanzu GemFire Native C++ Reference 10.3.0
apache::geode::client::RegionEntry Class Reference

An object in a Region that represents an entry, i.e., a key-value pair. More...

#include <RegionEntry.hpp>

Public Member Functions

std::shared_ptr< CacheableKeygetKey ()
 Returns the key for this entry. More...
 
std::shared_ptr< RegiongetRegion ()
 Returns the region that contains this entry. More...
 
std::shared_ptr< CacheStatisticsgetStatistics ()
 Returns the statistics for this entry. More...
 
std::shared_ptr< CacheablegetValue ()
 Returns the value of this entry in the local cache. More...
 
bool isDestroyed () const
 Returns whether this entry has been destroyed. More...
 
 RegionEntry (const std::shared_ptr< Region > &region, const std::shared_ptr< CacheableKey > &key, const std::shared_ptr< Cacheable > &value)
 constructors created by region More...
 

Detailed Description

An object in a Region that represents an entry, i.e., a key-value pair.

This object's operations are not distributed, do not acquire any locks, and do not affect CacheStatistics.

Unless otherwise noted, all of these methods throw a CacheClosedException if the Cache is closed at the time of invocation, or an EntryDestroyedException if the entry has been destroyed.

Constructor & Destructor Documentation

◆ RegionEntry()

apache::geode::client::RegionEntry::RegionEntry ( const std::shared_ptr< Region > &  region,
const std::shared_ptr< CacheableKey > &  key,
const std::shared_ptr< Cacheable > &  value 
)

constructors created by region

Member Function Documentation

◆ getKey()

std::shared_ptr< CacheableKey > apache::geode::client::RegionEntry::getKey ( )

Returns the key for this entry.

Returns
the key for this entry

◆ getRegion()

std::shared_ptr< Region > apache::geode::client::RegionEntry::getRegion ( )

Returns the region that contains this entry.

Returns
the Region that contains this entry

◆ getStatistics()

std::shared_ptr< CacheStatistics > apache::geode::client::RegionEntry::getStatistics ( )

Returns the statistics for this entry.

Returns
the CacheStatistics for this entry
Exceptions
StatisticsDisabledExceptionif statistics have been disabled for this region

◆ getValue()

std::shared_ptr< Cacheable > apache::geode::client::RegionEntry::getValue ( )

Returns the value of this entry in the local cache.

Does not invoke a CacheLoader,

Returns
the value or nullptr if this entry is invalid

◆ isDestroyed()

bool apache::geode::client::RegionEntry::isDestroyed ( ) const

Returns whether this entry has been destroyed.

Does not throw a EntryDestroyedException if this entry has been destroyed.

Returns
true if this entry has been destroyed

Apache Geode C++ Cache API Documentation