public class URIExtractionNamespaceFunctionFactory extends Object implements ExtractionNamespaceFunctionFactory<URIExtractionNamespace>
Constructor and Description |
---|
URIExtractionNamespaceFunctionFactory(Map<String,SearchableVersionedDataFinder> pullers) |
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Function<String,String> |
build(URIExtractionNamespace extractionNamespace,
Map<String,String> cache)
Create a function for the given namespace which will do the manipulation requested in the extractionNamespace.
|
Callable<String> |
getCachePopulator(URIExtractionNamespace extractionNamespace,
String lastVersion,
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 URIExtractionNamespaceFunctionFactory(Map<String,SearchableVersionedDataFinder> pullers)
public com.google.common.base.Function<String,String> build(URIExtractionNamespace extractionNamespace, Map<String,String> cache)
ExtractionNamespaceFunctionFactory
build
in interface ExtractionNamespaceFunctionFactory<URIExtractionNamespace>
extractionNamespace
- The ExtractionNamespace for which a manipulating function is needed.public Callable<String> getCachePopulator(URIExtractionNamespace extractionNamespace, String lastVersion, Map<String,String> cache)
ExtractionNamespaceFunctionFactory
getCachePopulator
in interface ExtractionNamespaceFunctionFactory<URIExtractionNamespace>
extractionNamespace
- The ExtractionNamespace for which to populate data.lastVersion
- 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 `build(...)` returns
a proper Function.Copyright © 2011–2015. All rights reserved.