VMware GemFire Native C++ Reference  9.1
apache::geode::client::CacheStatistics Class Reference

Defines common statistical information for both the region and its entries. More...

Inherits apache::geode::client::SharedBase.

Public Member Functions

virtual uint32_t getLastAccessedTime () const
 For an entry, returns the last time it was accessed via Region.get. More...
 
virtual uint32_t getLastModifiedTime () const
 For an entry, returns the time that the entry's value was last modified. More...
 
void preserveSB () const
 Atomically increment reference count. More...
 
int32_t refCount ()
 
void releaseSB () const
 Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero. More...
 

Detailed Description

Defines common statistical information for both the region and its entries.

All of these methods may throw a CacheClosedException, RegionDestroyedException, or EntryDestroyedException.

See also
Region::getStatistics
RegionEntry::getStatistics

Member Function Documentation

virtual uint32_t apache::geode::client::CacheStatistics::getLastAccessedTime ( ) const
virtual

For an entry, returns the last time it was accessed via Region.get.

For a region, returns the last time any of its entries or the entries of its subregions were accessed with Region.get. Any modifications will also update the lastAccessedTime, so lastAccessedTime is always >= lastModifiedTime. The lastAccessedTime on a region is propagated upward to parent regions, transitively, to the the root region.

The number is expressed as the number of milliseconds since January 1, 1970. The granularity may be as coarse as 100ms, so the accuracy may be off by up to 50ms.

Returns
the last access time of the region or the entry's value; returns 0 if entry is invalid or access time is uninitialized.
See also
Region::get
getLastModifiedTime
virtual uint32_t apache::geode::client::CacheStatistics::getLastModifiedTime ( ) const
virtual

For an entry, returns the time that the entry's value was last modified.

For a region, returns the last time any of the region's entries' values or the values in subregions' entries were modified. The modification may have been initiated locally, or it may have been an update distributed from another cache. It may also have been a new value provided by a loader. The modification time on a region is propagated upward to parent regions, transitively, to the root region.

The number is expressed as the number of milliseconds since January 1, 1970. The granularity may be as coarse as 100ms, so the accuracy may be off by up to 50ms.

Entry and subregion creation will update the modification time on a region, but destroy, destroyRegion, invalidate, and invalidateRegion do not update the modification time.

Returns
the last modification time of the region or the entry; returns 0 if the entry is invalid or the modification time is uninitialized.
See also
Region::put
Region::get
Region::create
Region::createSubregion
void apache::geode::client::SharedBase::preserveSB ( ) const
inherited

Atomically increment reference count.

int32_t apache::geode::client::SharedBase::refCount ( )
inlineinherited
Returns
the reference count
void apache::geode::client::SharedBase::releaseSB ( ) const
inherited

Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.


Pivotal GemFire C++ Cache API Documentation