gemfire::CacheLoader
interface. Public Member Functions | |
virtual void | close (const RegionPtr ®ion) |
virtual CacheablePtr | load (const RegionPtr ®ion, const CacheableKeyPtr &key, const UserDataPtr &aCallbackArgument) |
ManagedCacheLoaderGeneric (Object^ userptr) | |
Static Public Member Functions | |
static gemfire::CacheLoader * | create (const char *assemblyPath, const char *factoryFunctionName) |
gemfire::ManagedCacheLoaderGeneric::ManagedCacheLoaderGeneric | ( | Object^ | userptr | ) | [inline] |
Constructor to initialize with the provided managed object.
userptr | The managed object. |
virtual void gemfire::ManagedCacheLoaderGeneric::close | ( | const 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.
region | the region pointer |
static gemfire::CacheLoader* gemfire::ManagedCacheLoaderGeneric::create | ( | const char * | assemblyPath, | |
const char * | factoryFunctionName | |||
) | [static] |
Static function to create a ManagedCacheLoader
using given managed assembly path and given factory function.
assemblyPath | The path of the managed assembly that contains the ICacheLoader factory function. | |
factoryFunctionName | The name of the factory function of the managed class for creating an object that implements ICacheLoader . 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. |
virtual CacheablePtr gemfire::ManagedCacheLoaderGeneric::load | ( | const RegionPtr & | region, | |
const CacheableKeyPtr & | key, | |||
const UserDataPtr & | aCallbackArgument | |||
) | [virtual] |
Loads a value. Application writers should implement this method to customize the loading of a value.
This method is called by the caching service when the requested value is not in the cache. Any exception thrown by this method is propagated back to and thrown by the invocation of GemStone.GemFire.Cache.Region.Get that triggered this load.
region | a Region Pointer for which this is called. | |
key | the key for the cacheable | |
aCallbackArgument | any related user data, or null |