public class JDBCExtractionNamespaceCacheFactory extends Object implements ExtractionNamespaceCacheFactory<JDBCExtractionNamespace>
Constructor and Description |
---|
JDBCExtractionNamespaceCacheFactory() |
Modifier and Type | Method and Description |
---|---|
Callable<String> |
getCachePopulator(String id,
JDBCExtractionNamespace namespace,
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.
|
public Callable<String> getCachePopulator(String id, JDBCExtractionNamespace namespace, String lastVersion, Map<String,String> cache)
ExtractionNamespaceCacheFactory
getCachePopulator
in interface ExtractionNamespaceCacheFactory<JDBCExtractionNamespace>
id
- The ID of ExtractionNamespacenamespace
- 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 `buildFn(...)` returns
a proper Function.Copyright © 2011–2016. All rights reserved.