Package org.dataloader
Interface BatchLoaderWithContext<K,V extends @Nullable Object>
This form of
BatchLoader
is given a BatchLoaderEnvironment
object
that encapsulates the calling context. A typical use case is passing in security credentials or database connection details
say.
See BatchLoader
for more details on the design invariants that you must implement in order to
use this interface.-
Method Summary
Modifier and TypeMethodDescriptionload
(List<K> keys, BatchLoaderEnvironment environment) Called to batch load the provided keys and return a promise to a list of values.
-
Method Details
-
load
Called to batch load the provided keys and return a promise to a list of values. This default version can be given an environment object to that maybe be useful during the call. A typical use case is passing in security credentials or database details for example.- Parameters:
keys
- the collection of keys to loadenvironment
- an environment object that can help with the call- Returns:
- a promise of the values for those keys
-