Package org.apache.druid.client.cache
Interface Cache
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
CaffeineCache,HybridCache,MapCache,MemcachedCache
public interface Cache extends Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCache.NamedKey
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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)
-
-
-
Method Detail
-
get
@Nullable byte[] get(Cache.NamedKey key)
-
put
void put(Cache.NamedKey key, byte[] value)
-
getBulk
Map<Cache.NamedKey,byte[]> getBulk(Iterable<Cache.NamedKey> keys)
Resulting map should not contain any null values (i.e. cache misses should not be included)- Parameters:
keys-- Returns:
-
close
void close(String namespace)
-
getStats
CacheStats getStats()
-
isLocal
boolean isLocal()
-
doMonitor
void doMonitor(org.apache.druid.java.util.emitter.service.ServiceEmitter emitter)
Custom metrics not covered by CacheStats may be emitted by this method.- Parameters:
emitter- The service emitter to emit on.
-
-