public final class StaticMapExtractionNamespaceCacheFactory extends Object implements ExtractionNamespaceCacheFactory<StaticMapExtractionNamespace>
Constructor and Description |
---|
StaticMapExtractionNamespaceCacheFactory() |
Modifier and Type | Method and Description |
---|---|
CacheScheduler.VersionedCache |
populateCache(StaticMapExtractionNamespace namespace,
CacheScheduler.EntryImpl<StaticMapExtractionNamespace> id,
String lastVersion,
CacheScheduler scheduler)
If the lookup source, encapsulated by this
ExtractionNamespaceCacheFactory , has data newer than identified
by the given lastVersion (which is null at the first run of this method, or the version from the previous
run), this method creates a new CacheScheduler.VersionedCache with CacheScheduler.createVersionedCache(io.druid.server.lookup.namespace.cache.CacheScheduler.EntryImpl<? extends io.druid.query.lookup.namespace.ExtractionNamespace>, java.lang.String) , called on the given scheduler , with the version string identifying
the current version of lookup source, populates the created VersionedCache and returns it. |
public StaticMapExtractionNamespaceCacheFactory()
@Nullable public CacheScheduler.VersionedCache populateCache(StaticMapExtractionNamespace namespace, CacheScheduler.EntryImpl<StaticMapExtractionNamespace> id, String lastVersion, CacheScheduler scheduler)
ExtractionNamespaceCacheFactory
ExtractionNamespaceCacheFactory
, has data newer than identified
by the given lastVersion
(which is null at the first run of this method, or the version from the previous
run), this method creates a new CacheScheduler.VersionedCache
with CacheScheduler.createVersionedCache(io.druid.server.lookup.namespace.cache.CacheScheduler.EntryImpl<? extends io.druid.query.lookup.namespace.ExtractionNamespace>, java.lang.String)
, called on the given scheduler
, with the version string identifying
the current version of lookup source, populates the created VersionedCache
and returns it. If the lookup
source is up-to-date, this methods returns null.populateCache
in interface ExtractionNamespaceCacheFactory<StaticMapExtractionNamespace>
namespace
- The ExtractionNamespace for which to populate data.id
- An object uniquely corresponding to the CacheScheduler.Entry
, for which this populateCache()
method is called. Also it has the same toString() representation, that is useful for logginglastVersion
- The version which was last cachedscheduler
- Should be used only to call CacheScheduler.createVersionedCache(io.druid.server.lookup.namespace.cache.CacheScheduler.EntryImpl<? extends io.druid.query.lookup.namespace.ExtractionNamespace>, java.lang.String)
.Copyright © 2011–2017. All rights reserved.