public interface MappedBatchLoaderWithContext<K,V>
MappedBatchLoader
is given a BatchLoaderEnvironment
object
that encapsulates the calling context. A typical use case is passing in security credentials or database details
for example.
See MappedBatchLoader
for more details on the design invariants that you must implement in order to
use this interface.
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletionStage<java.util.Map<K,V>> |
load(java.util.Set<K> keys,
BatchLoaderEnvironment environment)
Called to batch load the provided keys and return a promise to a map of values.
|
java.util.concurrent.CompletionStage<java.util.Map<K,V>> load(java.util.Set<K> keys, BatchLoaderEnvironment environment)
keys
- the set of keys to loadenvironment
- the calling environment