public class KafkaExtractionNamespaceFactory extends Object implements ExtractionNamespaceFunctionFactory<KafkaExtractionNamespace>
| Constructor and Description |
|---|
KafkaExtractionNamespaceFactory(KafkaExtractionManager kafkaExtractionManager) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Function<String,String> |
buildFn(KafkaExtractionNamespace extractionNamespace,
Map<String,String> cache)
Create a function for the given namespace which will do the manipulation requested in the extractionNamespace.
|
com.google.common.base.Function<String,List<String>> |
buildReverseFn(KafkaExtractionNamespace extractionNamespace,
Map<String,String> cache) |
Callable<String> |
getCachePopulator(KafkaExtractionNamespace extractionNamespace,
String unused,
Map<String,String> cache)
This function is called once if `ExtractionNamespace.getUpdateMs() == 0`, or every update if
`ExtractionNamespace.getUpdateMs() > 0`
For ExtractionNamespace which have the NamespaceExtractionCacheManager handle regular updates, this function
is used to populate the namespace cache each time.
|
@Inject public KafkaExtractionNamespaceFactory(KafkaExtractionManager kafkaExtractionManager)
public com.google.common.base.Function<String,String> buildFn(KafkaExtractionNamespace extractionNamespace, Map<String,String> cache)
ExtractionNamespaceFunctionFactorybuildFn in interface ExtractionNamespaceFunctionFactory<KafkaExtractionNamespace>extractionNamespace - The ExtractionNamespace for which a manipulating function is needed.public com.google.common.base.Function<String,List<String>> buildReverseFn(KafkaExtractionNamespace extractionNamespace, Map<String,String> cache)
buildReverseFn in interface ExtractionNamespaceFunctionFactory<KafkaExtractionNamespace>extractionNamespace - The ExtractionNamespace for which a manipulating reverse function is needed.cache - view of the cache containing the function mapping.public Callable<String> getCachePopulator(KafkaExtractionNamespace extractionNamespace, String unused, Map<String,String> cache)
ExtractionNamespaceFunctionFactorygetCachePopulator in interface ExtractionNamespaceFunctionFactory<KafkaExtractionNamespace>extractionNamespace - The ExtractionNamespace for which to populate data.unused - The version which was last cachedcache - The temporary Map into which data may be placed and will be "swapped" with the proper
namespace Map in NamespaceExtractionCacheManager. Implementations which cannot offer
a swappable cache of the data may ignore this but must make sure `buildFn(...)` returns
a proper Function.Copyright © 2011–2016. All rights reserved.