gemfire::ManagedCacheListenerGeneric Class Reference


Detailed Description

Wraps the managed GemStone.GemFire.Cache.ICacheListener object and implements the native gemfire::CacheListener interface.

Public Member Functions

virtual void afterCreate (const gemfire::EntryEvent &ev)
virtual void afterDestroy (const gemfire::EntryEvent &ev)
virtual void afterInvalidate (const gemfire::EntryEvent &ev)
virtual void afterRegionClear (const gemfire::RegionEvent &ev)
virtual void afterRegionDestroy (const gemfire::RegionEvent &ev)
virtual void afterRegionInvalidate (const gemfire::RegionEvent &ev)
virtual void afterRegionLive (const gemfire::RegionEvent &ev)
virtual void afterUpdate (const gemfire::EntryEvent &ev)
virtual void close (const gemfire::RegionPtr &region)
 ManagedCacheListenerGeneric (Object^ userptr)
GemStone::GemFire::Cache::ICacheListenerptr () const
virtual ~ManagedCacheListenerGeneric ()

Static Public Member Functions

static
gemfire::CacheListener * 
create (const char *assemblyPath, const char *factoryFunctionName)

Constructor & Destructor Documentation

gemfire::ManagedCacheListenerGeneric::ManagedCacheListenerGeneric ( Object^   userptr  )  [inline]

Constructor to initialize with the provided managed object.

Parameters:
userptr The managed object.

virtual gemfire::ManagedCacheListenerGeneric::~ManagedCacheListenerGeneric (  )  [inline, virtual]

Destructor -- does nothing.


Member Function Documentation

virtual void gemfire::ManagedCacheListenerGeneric::afterCreate ( const gemfire::EntryEvent &  ev  )  [virtual]

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:
ev Denotes the event object associated with the entry creation.
See also:
GemStone.GemFire.Cache.Region.Create, GemStone.GemFire.Cache.Region.Put, GemStone.GemFire.Cache.Region.Get

virtual void gemfire::ManagedCacheListenerGeneric::afterDestroy ( const gemfire::EntryEvent &  ev  )  [virtual]

Handles the event of an entry being destroyed.

Parameters:
ev EntryEvent denotes the event object associated with the entry destruction.
See also:
GemStone.GemFire.Cache.Region.Destroy

virtual void gemfire::ManagedCacheListenerGeneric::afterInvalidate ( const gemfire::EntryEvent &  ev  )  [virtual]

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

Parameters:
ev EntryEvent denotes the event object associated with the entry invalidation.

virtual void gemfire::ManagedCacheListenerGeneric::afterRegionClear ( const gemfire::RegionEvent &  ev  )  [virtual]

Handles the event of a region being cleared.

virtual void gemfire::ManagedCacheListenerGeneric::afterRegionDestroy ( const gemfire::RegionEvent &  ev  )  [virtual]

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:
ev RegionEvent denotes the event object associated with the region destruction.
See also:
GemStone.GemFire.Cache.Region.DestroyRegion

virtual void gemfire::ManagedCacheListenerGeneric::afterRegionInvalidate ( const gemfire::RegionEvent &  ev  )  [virtual]

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:
ev RegionEvent denotes the event object associated with the region invalidation.
See also:
GemStone.GemFire.Cache.Region.InvalidateRegion

virtual void gemfire::ManagedCacheListenerGeneric::afterRegionLive ( const gemfire::RegionEvent &  ev  )  [virtual]

Handles the event of a region being live.

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

Parameters:
ev RegionEvent denotes the event object associated with the region going live.
See also:
GemStone.GemFire.Cache.Cache.ReadyForEvents

virtual void gemfire::ManagedCacheListenerGeneric::afterUpdate ( const gemfire::EntryEvent &  ev  )  [virtual]

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:
ev EntryEvent denotes the event object associated with updating the entry.
See also:
GemStone.GemFire.Cache.Region.Put

virtual void gemfire::ManagedCacheListenerGeneric::close ( const gemfire::RegionPtr &  region  )  [virtual]

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:
GemStone.GemFire.Cache.Cache.Close, GemStone.GemFire.Cache.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>

static gemfire::CacheListener* gemfire::ManagedCacheListenerGeneric::create ( const char *  assemblyPath,
const char *  factoryFunctionName 
) [static]

Static function to create a ManagedCacheListener using given managed assembly path and given factory function.

Parameters:
assemblyPath The path of the managed assembly that contains the ICacheListener factory function.
factoryFunctionName The name of the factory function of the managed class for creating an object that implements ICacheListener. This should be a static function of the format {Namespace}.{Class Name}.{Method Name}.
Exceptions:
IllegalArgumentException If the managed library cannot be loaded or the factory function fails.

GemStone::GemFire::Cache::ICacheListener ^ gemfire::ManagedCacheListenerGeneric::ptr (  )  const [inline]

Returns the wrapped managed object reference.


GemFire C++ Cache .NET API Documentation