@Beta public final class MapOfProducedProducer<K,V> extends AbstractProducer<Map<K,Produced<V>>>
Producer implementation used to implement Map bindings. This producer returns a
Map<K, Produced<V>> which is populated by calls to the delegate Producer.get()
methods.| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<Map<K,Produced<V>>> |
compute(ProducerMonitor unusedMonitor)
Computes this producer's future, which is then cached in
AbstractProducer.get(). |
static <K,V> MapOfProducedProducer<K,V> |
create(Producer<Map<K,Producer<V>>> mapProducerProducer)
Returns a producer of
Map<K, Produced<V>>, where the map is derived from the given map
of producers by waiting for those producers' resulting futures. |
getpublic static <K,V> MapOfProducedProducer<K,V> create(Producer<Map<K,Producer<V>>> mapProducerProducer)
Map<K, Produced<V>>, where the map is derived from the given map
of producers by waiting for those producers' resulting futures. The iteration order mirrors the
order of the input map.
If any of the delegate producers, or their resulting values, are null, then this producer's
future will succeed and the corresponding Produced<V> will fail with a
NullPointerException.
Canceling this future will attempt to cancel all of the component futures, and if any of the component futures fails or is canceled, this one is, too.
public com.google.common.util.concurrent.ListenableFuture<Map<K,Produced<V>>> compute(ProducerMonitor unusedMonitor)
AbstractProducerAbstractProducer.get().Copyright © 2016 Google, Inc.. All Rights Reserved.