Gemfire JavaDocs
Package org.apache.geode.cache
Interface LoaderHelper<K,V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
getArgument()
Return the argument object for the load method that was passed in from application code.K
getKey()
Returns the key for the value being loaded.Region<K,V>
getRegion()
Returns the region to which the entry belongs.V
netSearch(boolean doNetLoad)
Searches other caches for the value to be loaded.
-
-
-
Method Detail
-
netSearch
V netSearch(boolean doNetLoad) throws CacheLoaderException, TimeoutException
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 present in the system, and doNetLoad is true, GemFire looks for and invokesCacheLoaders
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:
doNetLoad
- if true, and there is no valid value found for this entry in the system, then look for and invoke loaders on other nodes- Returns:
- the requested value or null if not found
- Throws:
TimeoutException
- if the netSearch times out before getting a response from another cacheCacheLoaderException
- IfnetSearch
is attempted on a local region.
-
getKey
K getKey()
Returns the key for the value being loaded.- Returns:
- the name Object for the object being loaded
- See Also:
load
-
getRegion
Region<K,V> getRegion()
Returns the region to which the entry belongs.- Returns:
- the name of the region for the object being loaded
- See Also:
load
-
getArgument
java.lang.Object getArgument()
Return the argument object for the load method that was passed in from application code. This object is passed in as aLoaderArgument inget
.- Returns:
- the argument or null if one was not supplied
-
-