public class JdbcDataFetcher extends Object implements DataFetcher<String,String>
| Constructor and Description | 
|---|
JdbcDataFetcher(MetadataStorageConnectorConfig connectorConfig,
               String table,
               String keyColumn,
               String valueColumn,
               Integer streamingFetchSize)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object o)  | 
Iterable<Map.Entry<String,String>> | 
fetch(Iterable<String> keys)
Function used to perform a bulk lookup 
 | 
String | 
fetch(String key)
Function to perform a one item lookup. 
 | 
Iterable<Map.Entry<String,String>> | 
fetchAll()
Function used to fetch all the pair of key-values from the lookup
 One use case of this method is to populate a polling cache  
PollingCache | 
List<String> | 
reverseFetchKeys(String value)
Function used to perform reverse lookup 
 | 
String | 
toString()  | 
public JdbcDataFetcher(MetadataStorageConnectorConfig connectorConfig, String table, String keyColumn, String valueColumn, Integer streamingFetchSize)
public Iterable<Map.Entry<String,String>> fetchAll()
DataFetcherPollingCachefetchAll in interface DataFetcher<String,String>Iterable of key-value pairs.public String fetch(String key)
DataFetcherfetch in interface DataFetcher<String,String>key - non-null key used to lookup the valuepublic Iterable<Map.Entry<String,String>> fetch(Iterable<String> keys)
DataFetcherfetch in interface DataFetcher<String,String>keys - used to lookup the respective valuesIterable containing the pair of existing key-value.public List<String> reverseFetchKeys(String value)
DataFetcherreverseFetchKeys in interface DataFetcher<String,String>value - use to fetch it's keys from the lookup tablevalue or an empty list Collections.EmptyListCopyright © 2011–2018. All rights reserved.