Pivotal GemFire Native .NET Reference  10.0.5
Apache::Geode::Client::CacheListenerAdapter< TKey, TValue > Class Template Reference

Utility class that implements all methods in ICacheListener with empty implementations. More...

Inherits Apache::Geode::Client::ICacheListener< TKey, TValue >.

Public Member Functions

virtual void AfterCreate (EntryEvent< TKey, TValue >^ ev)
 Handles the event of a new key being added to a region. More...
 
virtual void AfterDestroy (EntryEvent< TKey, TValue >^ ev)
 Handles the event of an entry being destroyed. More...
 
virtual void AfterInvalidate (EntryEvent< TKey, TValue >^ ev)
 Handles the event of an entry's value being invalidated. More...
 
virtual void AfterRegionClear (RegionEvent< TKey, TValue >^ ev)
 Handles the event of a region being cleared. More...
 
virtual void AfterRegionDestroy (RegionEvent< TKey, TValue >^ ev)
 Handles the event of a region being destroyed. More...
 
virtual void AfterRegionInvalidate (RegionEvent< TKey, TValue >^ ev)
 Handles the event of a region being invalidated. More...
 
virtual void AfterRegionLive (RegionEvent< TKey, TValue >^ ev)
 Handles the event of a region going live. More...
 
virtual void AfterUpdate (EntryEvent< TKey, TValue >^ ev)
 Handles the event of an entry's value being modified in a region. More...
 
virtual void Close (Apache::Geode::Client::IRegion< TKey, TValue >^ region)
 Called when the region containing this callback is destroyed, when the cache is closed. More...
 

Detailed Description

template<class TKey, class TValue>
class Apache::Geode::Client::CacheListenerAdapter< TKey, TValue >

Utility class that implements all methods in ICacheListener with empty implementations.

Applications can subclass this class and only override the methods for the events of interest.

Member Function Documentation

◆ AfterCreate()

template<class TKey , class TValue >
virtual void Apache::Geode::Client::CacheListenerAdapter< TKey, TValue >::AfterCreate ( EntryEvent< TKey, TValue >^  ev)
inlinevirtual

Handles the event of a new key being added to a region.

The entry did not previously exist in this region in the local cache (even with a null value).

This function does not throw any exception.

Parameters
evDenotes the event object associated with the entry creation.
See also
Region.Create, Region.Put, Region.Get

Implements Apache::Geode::Client::ICacheListener< TKey, TValue >.

◆ AfterDestroy()

template<class TKey , class TValue >
virtual void Apache::Geode::Client::CacheListenerAdapter< TKey, TValue >::AfterDestroy ( EntryEvent< TKey, TValue >^  ev)
inlinevirtual

Handles the event of an entry being destroyed.

Parameters
evEntryEvent denotes the event object associated with the entry destruction.
See also
Region.Destroy

Implements Apache::Geode::Client::ICacheListener< TKey, TValue >.

◆ AfterInvalidate()

template<class TKey , class TValue >
virtual void Apache::Geode::Client::CacheListenerAdapter< TKey, TValue >::AfterInvalidate ( EntryEvent< TKey, TValue >^  ev)
inlinevirtual

Handles the event of an entry's value being invalidated.

Parameters
evEntryEvent denotes the event object associated with the entry invalidation.

Implements Apache::Geode::Client::ICacheListener< TKey, TValue >.

◆ AfterRegionClear()

template<class TKey , class TValue >
virtual void Apache::Geode::Client::CacheListenerAdapter< TKey, TValue >::AfterRegionClear ( RegionEvent< TKey, TValue >^  ev)
inlinevirtual

Handles the event of a region being cleared.

Implements Apache::Geode::Client::ICacheListener< TKey, TValue >.

◆ AfterRegionDestroy()

template<class TKey , class TValue >
virtual void Apache::Geode::Client::CacheListenerAdapter< TKey, TValue >::AfterRegionDestroy ( RegionEvent< TKey, TValue >^  ev)
inlinevirtual

Handles the event of a region being destroyed.

Events are not invoked for each individual entry that is destroyed as a result of the region being destroyed. Each subregion, however, gets its own AfterRegionDestroyed event invoked on its listener.

Parameters
evRegionEvent denotes the event object associated with the region destruction.
See also
Region.DestroyRegion

Implements Apache::Geode::Client::ICacheListener< TKey, TValue >.

◆ AfterRegionInvalidate()

template<class TKey , class TValue >
virtual void Apache::Geode::Client::CacheListenerAdapter< TKey, TValue >::AfterRegionInvalidate ( RegionEvent< TKey, TValue >^  ev)
inlinevirtual

Handles the event of a region being invalidated.

Events are not invoked for each individual value that is invalidated as a result of the region being invalidated. Each subregion, however, gets its own RegionInvalidated event invoked on its listener.

Parameters
evRegionEvent denotes the event object associated with the region invalidation.
See also
Region.InvalidateRegion

Implements Apache::Geode::Client::ICacheListener< TKey, TValue >.

◆ AfterRegionLive()

template<class TKey , class TValue >
virtual void Apache::Geode::Client::CacheListenerAdapter< TKey, TValue >::AfterRegionLive ( RegionEvent< TKey, TValue >^  ev)
inlinevirtual

Handles the event of a region going live.

Each subregion gets its own AfterRegionLive event invoked on its listener.

Parameters
evRegionEvent denotes the event object associated with the region going live.
See also
Cache.ReadyForEvents

Implements Apache::Geode::Client::ICacheListener< TKey, TValue >.

◆ AfterUpdate()

template<class TKey , class TValue >
virtual void Apache::Geode::Client::CacheListenerAdapter< TKey, TValue >::AfterUpdate ( EntryEvent< TKey, TValue >^  ev)
inlinevirtual

Handles the event of an entry's value being modified in a region.

This entry previously existed in this region in the local cache, but its previous value may have been null.

Parameters
evEntryEvent denotes the event object associated with updating the entry.
See also
Region.Put

Implements Apache::Geode::Client::ICacheListener< TKey, TValue >.

◆ Close()

template<class TKey , class TValue >
virtual void Apache::Geode::Client::CacheListenerAdapter< TKey, TValue >::Close ( Apache::Geode::Client::IRegion< TKey, TValue >^  region)
inlinevirtual

Called when the region containing this callback is destroyed, when the cache is closed.

Implementations should clean up any external resources, such as database connections. Any runtime exceptions this method throws will be logged.

It is possible for this method to be called multiple times on a single callback instance, so implementations must be tolerant of this.

See also
Cache.Close, Region.DestroyRegion

summary> Called when all the endpoints associated with region are down. This will be called when all the endpoints are down for the first time. If endpoints come up and again go down it will be called again. This will also be called when all endpoints are down and region is attached to the pool. /summary> remarks> /remark> param> region Region^ denotes the assosiated region. /param>

Implements Apache::Geode::Client::ICacheListener< TKey, TValue >.


Apache Geode C++ Cache .NET API Documentation