gemfire::CacheWriter
interface. Public Member Functions | |
bool | beforeCreate (const EntryEvent &ev) |
bool | beforeDestroy (const EntryEvent &ev) |
bool | beforeRegionClear (const RegionEvent &ev) |
bool | beforeRegionDestroy (const RegionEvent &ev) |
bool | beforeUpdate (const EntryEvent &ev) |
void | close (const RegionPtr &rp) |
ManagedCacheWriterGeneric (Object^ userptr) | |
GemStone::GemFire::Cache::ICacheWriter^ | ptr () const |
Static Public Member Functions | |
static CacheWriter * | create (const char *assemblyPath, const char *factoryFunctionName) |
gemfire::ManagedCacheWriterGeneric::ManagedCacheWriterGeneric | ( | Object^ | userptr | ) | [inline] |
Constructor to initialize with the provided managed object.
userptr | The managed object. |
bool gemfire::ManagedCacheWriterGeneric::beforeCreate | ( | const EntryEvent & | ev | ) |
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.
ev | EntryEvent denotes the event object associated with creating the entry |
bool gemfire::ManagedCacheWriterGeneric::beforeDestroy | ( | const EntryEvent & | ev | ) |
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 GemStone.GemFire.Cache.Region.LocalDestroyRegion.
ev | EntryEvent denotes the event object associated with destroying the entry |
bool gemfire::ManagedCacheWriterGeneric::beforeRegionClear | ( | const RegionEvent & | ev | ) |
called before this region is cleared
bool gemfire::ManagedCacheWriterGeneric::beforeRegionDestroy | ( | const RegionEvent & | ev | ) |
called before this region is destroyed
ev | RegionEvent denotes the event object associated with destroying the region |
bool gemfire::ManagedCacheWriterGeneric::beforeUpdate | ( | const EntryEvent & | ev | ) |
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.
ev | EntryEvent denotes the event object associated with updating the entry |
void gemfire::ManagedCacheWriterGeneric::close | ( | const RegionPtr & | rp | ) |
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.
static CacheWriter* gemfire::ManagedCacheWriterGeneric::create | ( | const char * | assemblyPath, | |
const char * | factoryFunctionName | |||
) | [static] |
Static function to create a ManagedCacheWriter
using given managed assembly path and given factory function.
assemblyPath | The path of the managed assembly that contains the ICacheWriter factory function. | |
factoryFunctionName | The name of the factory function of the managed class for creating an object that implements ICacheWriter . This should be a static function of the format {Namespace}.{Class Name}.{Method Name}. |
IllegalArgumentException | If the managed library cannot be loaded or the factory function fails. |
GemStone::GemFire::Cache::ICacheWriter ^ gemfire::ManagedCacheWriterGeneric::ptr | ( | ) | const [inline] |
Returns the wrapped managed object reference.