GemStone::GemFire::Cache::CacheWriterAdapter Class Reference

Inherits GemStone::GemFire::Cache::ICacheWriter.

Inherited by GemStone::GemFire::Cache::Generic::CacheWriterGeneric< TKey, TValue > [private].


Detailed Description

Utility class that implements all methods in ICacheWriter with empty implementations. Applications can subclass this class and only override the methods for the events of interest.

Public Member Functions

virtual bool BeforeCreate (EntryEvent^ ev)
virtual bool BeforeDestroy (EntryEvent^ ev)
virtual bool BeforeRegionClear (RegionEvent^ ev)
virtual bool BeforeRegionDestroy (RegionEvent^ ev)
virtual bool BeforeUpdate (EntryEvent^ ev)
virtual void Close (Region^ region)

Member Function Documentation

virtual bool GemStone::GemFire::Cache::CacheWriterAdapter::BeforeCreate ( EntryEvent^   ev  )  [inline, virtual]

Called before an entry is created. Entry creation is initiated by a Create, a Put, or a Get.

The CacheWriter can determine whether this value comes from a Get or not from Load. The entry being created may already exist in the local cache where this CacheWriter is installed, but it does not yet exist in the cache where the operation was initiated.

Parameters:
ev event object associated with creating the entry
See also:
Region.Create, Region.Put, Region.Get

Implements GemStone::GemFire::Cache::ICacheWriter.

virtual bool GemStone::GemFire::Cache::CacheWriterAdapter::BeforeDestroy ( EntryEvent^   ev  )  [inline, virtual]

Called before an entry is destroyed.

The entry being destroyed may or may not exist in the local cache where the CacheWriter is installed. This method is not called as a result of expiration or Region.LocalDestroyRegion.

Parameters:
ev event object associated with destroying the entry
See also:
Region.Destroy

Implements GemStone::GemFire::Cache::ICacheWriter.

virtual bool GemStone::GemFire::Cache::CacheWriterAdapter::BeforeRegionClear ( RegionEvent^   ev  )  [inline, virtual]

Called before this region is cleared.

Implements GemStone::GemFire::Cache::ICacheWriter.

virtual bool GemStone::GemFire::Cache::CacheWriterAdapter::BeforeRegionDestroy ( RegionEvent^   ev  )  [inline, virtual]

Called before this region is destroyed.

Parameters:
ev event object associated with destroying the region
See also:
Region.DestroyRegion

Implements GemStone::GemFire::Cache::ICacheWriter.

virtual bool GemStone::GemFire::Cache::CacheWriterAdapter::BeforeUpdate ( EntryEvent^   ev  )  [inline, virtual]

Called before an entry is updated. The entry update is initiated by a Put or a Get that causes the loader to update an existing entry.

The entry previously existed in the cache where the operation was initiated, although the old value may have been null. The entry being updated may or may not exist in the local cache where the CacheWriter is installed.

Parameters:
ev event object associated with updating the entry
See also:
Region.Put, Region.Get

Implements GemStone::GemFire::Cache::ICacheWriter.

virtual void GemStone::GemFire::Cache::CacheWriterAdapter::Close ( Region^   region  )  [inline, 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.

Parameters:
region region to close
See also:
Cache.Close, Region.DestroyRegion

Implements GemStone::GemFire::Cache::ICacheWriter.


GemFire C++ Cache .NET API Documentation