GemStone::GemFire::Cache::CacheLoader Class Reference


Detailed Description

Static class that contains the NetSearch utility function.

The NetSearch function is useful for the end-user implementing callbacks to lookup the key on other members of the distributed system.

Static Public Member Functions

static IGFSerializableNetSearch (Region^ region, CacheableKey^ key, Boolean netLoad, IGFSerializable^ cacheLoaderArg)
static IGFSerializableNetSearch (Region^ region, ICacheableKey^ key, Boolean netLoad, IGFSerializable^ cacheLoaderArg)


Member Function Documentation

static IGFSerializable ^ GemStone::GemFire::Cache::CacheLoader::NetSearch ( Region^   region,
CacheableKey^   key,
Boolean  netLoad,
IGFSerializable^   cacheLoaderArg 
) [static]

Searches other caches for the value to be loaded.

If the cache is part of a distributed caching system, NetSearch will try to locate the requested value in any other cache within the system. If the search is successful, a reference to a local copy of the value is returned. If there is no value for this entry locally, and doNetLoad is true, GemFire looks for and invokes CacheLoaders in other nodes in the system. The net load will invoke one loader at a time until a loader either returns a non-null value or throws an exception. If the object is not found, NULL is returned.

Parameters:
region the region to do the net search on
key the key to do the net search for
netLoad if true, and there is no valid value found for this entry in the local system, then look for and invoke loaders on other nodes.
cacheLoaderArg passed to netloader if not null, and if there is no valid value found for this entry in the local system, then look for and invoke loaders on other nodes
Returns:
The value found by the net search operation, or NULL if nothing was found.

static IGFSerializable ^ GemStone::GemFire::Cache::CacheLoader::NetSearch ( Region^   region,
ICacheableKey^   key,
Boolean  netLoad,
IGFSerializable^   cacheLoaderArg 
) [static]

Searches other caches for the value to be loaded.

If the cache is part of a distributed caching system, NetSearch will try to locate the requested value in any other cache within the system. If the search is successful, a reference to a local copy of the value is returned. If there is no value for this entry locally, and doNetLoad is true, GemFire looks for and invokes CacheLoaders in other nodes in the system. The net load will invoke one loader at a time until a loader either returns a non-null value or throws an exception. If the object is not found, NULL is returned.

Parameters:
region the region to do the net search on
key the key to do the net search for
netLoad if true, and there is no valid value found for this entry in the local system, then look for and invoke loaders on other nodes.
cacheLoaderArg passed to netloader if not null, and if there is no valid value found for this entry in the local system, then look for and invoke loaders on other nodes
Returns:
The value found by the net search operation, or NULL if nothing was found.


GemFire C++ Cache .NET API Documentation