Package org.apache.druid.client.cache
Interface CachePopulator
-
- All Known Implementing Classes:
BackgroundCachePopulator,ForegroundCachePopulator
public interface CachePopulatorAbstraction of mechanism for populating aCacheby wrapping aSequenceand providing a function to extract the values from it. At runtime, theCachePopulatorimplementation is used as a singleton and injected where needed to share between all cacheables, which requires theCacheitself to be thread-safe. Consumers of theSequencewill either be a processing thread (in the case of a historical or task), or an http thread in the case of a broker. See: historicals:ServerManagerandCachingQueryRunnerrealtime tasks:SinkQuerySegmentWalkerandCachingQueryRunnerbrokers:ClientQuerySegmentWalkerandCachingClusteredClientfor additional details
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T,CacheType>
org.apache.druid.java.util.common.guava.Sequence<T>wrap(org.apache.druid.java.util.common.guava.Sequence<T> sequence, Function<T,CacheType> cacheFn, Cache cache, Cache.NamedKey cacheKey)
-
-
-
Method Detail
-
wrap
<T,CacheType> org.apache.druid.java.util.common.guava.Sequence<T> wrap(org.apache.druid.java.util.common.guava.Sequence<T> sequence, Function<T,CacheType> cacheFn, Cache cache, Cache.NamedKey cacheKey)
-
-