Package org.apache.druid.client.cache
Class HybridCache
- java.lang.Object
-
- org.apache.druid.client.cache.HybridCache
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Cache
public class HybridCache extends Object implements Cache
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.druid.client.cache.Cache
Cache.NamedKey
-
-
Constructor Summary
Constructors Constructor Description HybridCache(HybridCacheConfig config, Cache level1, Cache level2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidclose(String namespace)voiddoMonitor(org.apache.druid.java.util.emitter.service.ServiceEmitter emitter)Custom metrics not covered by CacheStats may be emitted by this method.byte[]get(Cache.NamedKey key)Map<Cache.NamedKey,byte[]>getBulk(Iterable<Cache.NamedKey> keys)Resulting map should not contain any null values (i.e.CacheStatsgetStats()booleanisLocal()voidput(Cache.NamedKey key, byte[] value)
-
-
-
Constructor Detail
-
HybridCache
public HybridCache(HybridCacheConfig config, Cache level1, Cache level2)
-
-
Method Detail
-
get
@Nullable public byte[] get(Cache.NamedKey key)
-
put
public void put(Cache.NamedKey key, byte[] value)
-
getBulk
public Map<Cache.NamedKey,byte[]> getBulk(Iterable<Cache.NamedKey> keys)
Description copied from interface:CacheResulting map should not contain any null values (i.e. cache misses should not be included)
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getStats
public CacheStats getStats()
-
doMonitor
public void doMonitor(org.apache.druid.java.util.emitter.service.ServiceEmitter emitter)
Description copied from interface:CacheCustom metrics not covered by CacheStats may be emitted by this method.
-
-