Note: This API is now obsolete.
A data-loading application plug-in that can be installed on a region.
Namespace: GemStone.GemFire.CacheAssembly: Gemstone.Gemfire.Cache (in Gemstone.Gemfire.Cache.dll) Version: 9.0.6.18
Syntax[ObsoleteAttribute("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
public interface ICacheLoader
<ObsoleteAttribute("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")>
Public Interface ICacheLoader
[ObsoleteAttribute(L"Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
public interface class ICacheLoader
[<ObsoleteAttribute("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")>]
type ICacheLoader = interface end
The ICacheLoader type exposes the following members.
Methods
| Name | Description |
---|
 | Close |
Called when the region containing this callback is destroyed, when
the cache is closed.
|
 | Load |
Loads a value. Application writers should implement this
method to customize the loading of a value.
|
Top
Remarks
Loaders facilitate loading of data into the cache from a third-party data source.
When an application does a
lookup for a key in a region and it does not exist, GemFire checks to
see if any loaders are available for the region in the system and
invokes them to get the value for the key into the cache.
A cache loader is defined in the RegionAttributes.
When
[!:Region.Get] is called for a region
entry that has a null value, the
[!:ICacheLoader.Load]
method of the region's cache loader is invoked. The
Load method
creates the value for the desired key by performing an operation such
as a database query.
See AlsoReference
[!:AttributesFactory.SetCacheLoader]
[!:RegionAttributes.CacheLoader]
[!:ICacheListener]
[!:ICacheWriter]