Package org.jclouds.suppliers
Class SupplyKeyMatchingValueOrNull<K,V>
- java.lang.Object
 - 
- org.jclouds.suppliers.SupplyKeyMatchingValueOrNull<K,V>
 
 
- 
- All Implemented Interfaces:
 com.google.common.base.Supplier<K>,Supplier<K>
- Direct Known Subclasses:
 GetRegionIdMatchingProviderURIOrNull
public class SupplyKeyMatchingValueOrNull<K,V> extends Object implements com.google.common.base.Supplier<K>
Allows you to lazy discover a key by value. This is useful for example in service discovery, where you need to see what the "current" service name is based on a map of service names to endpoints.note
take care to memoize this usingSuppliers.memoize(Supplier) 
- 
- 
Constructor Summary
Constructors Constructor Description SupplyKeyMatchingValueOrNull(com.google.common.base.Supplier<Map<K,com.google.common.base.Supplier<V>>> supplier, com.google.common.base.Supplier<V> valueSupplier) 
 - 
 
- 
- 
Field Detail
- 
logger
protected Logger logger
 
 - 
 
 -