Class ForegroundCachePopulator

  • All Implemented Interfaces:
    CachePopulator

    public class ForegroundCachePopulator
    extends Object
    implements CachePopulator
    CachePopulator implementation that populates a cache on the same thread that is processing the Sequence. Used if config "druid.*.cache.numBackgroundThreads" is 0 (the default).
    • Constructor Detail

      • ForegroundCachePopulator

        public ForegroundCachePopulator​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                        CachePopulatorStats cachePopulatorStats,
                                        long maxEntrySize)
    • Method Detail

      • wrap

        public <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)
        Specified by:
        wrap in interface CachePopulator