public interface CachePopulator
Cache by wrapping a Sequence and providing a function to
extract the values from it. At runtime, the CachePopulator implementation is used as a singleton and
injected where needed to share between all cacheables, which requires the Cache itself to be thread-safe.
Consumers of the Sequence will 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: ServerManager and
CachingQueryRunner
realtime tasks: SinkQuerySegmentWalker and
CachingQueryRunner
brokers: ClientQuerySegmentWalker and
CachingClusteredClient
for additional details| Modifier and Type | Method and Description |
|---|---|
<T,CacheType> |
wrap(Sequence<T> sequence,
Function<T,CacheType> cacheFn,
Cache cache,
Cache.NamedKey cacheKey) |
<T,CacheType> Sequence<T> wrap(Sequence<T> sequence, Function<T,CacheType> cacheFn, Cache cache, Cache.NamedKey cacheKey)
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.