Package org.apache.druid.client.cache
Class BackgroundCachePopulator
- java.lang.Object
-
- org.apache.druid.client.cache.BackgroundCachePopulator
-
- All Implemented Interfaces:
CachePopulator
public class BackgroundCachePopulator extends Object implements CachePopulator
CachePopulatorimplementation that uses aExecutorServicethread pool to populate a cache in the background. Used if config "druid.*.cache.numBackgroundThreads" is greater than 0.
-
-
Constructor Summary
Constructors Constructor Description BackgroundCachePopulator(ExecutorService exec, com.fasterxml.jackson.databind.ObjectMapper objectMapper, CachePopulatorStats cachePopulatorStats, long maxEntrySize)
-
Method Summary
All Methods Instance Methods Concrete 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)
-
-
-
Constructor Detail
-
BackgroundCachePopulator
public BackgroundCachePopulator(ExecutorService exec, 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:
wrapin interfaceCachePopulator
-
-