Package org.apache.druid.client.cache
Class MemcachedCache
java.lang.Object
org.apache.druid.client.cache.MemcachedCache
- All Implemented Interfaces:
Closeable,AutoCloseable,Cache
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.druid.client.cache.Cache
Cache.NamedKey -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidstatic MemcachedCachecreate(MemcachedCacheConfig config) static net.spy.memcached.ConnectionFactorycreateConnectionFactory(MemcachedCacheConfig config, LZ4Transcoder transcoder, net.spy.memcached.ops.OperationQueueFactory opQueueFactory, net.spy.memcached.metrics.MetricCollector metricCollector) voiddoMonitor(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.getStats()booleanisLocal()voidput(Cache.NamedKey key, byte[] value)
-
Field Details
-
MAX_PREFIX_LENGTH
public static final int MAX_PREFIX_LENGTH- See Also:
-
-
Method Details
-
create
-
createConnectionFactory
public static net.spy.memcached.ConnectionFactory createConnectionFactory(MemcachedCacheConfig config, LZ4Transcoder transcoder, net.spy.memcached.ops.OperationQueueFactory opQueueFactory, net.spy.memcached.metrics.MetricCollector metricCollector) throws KeyManagementException, KeyStoreException, NoSuchAlgorithmException -
getStats
-
get
-
put
-
getBulk
Description copied from interface:CacheResulting map should not contain any null values (i.e. cache misses should not be included) -
close
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
isLocal
public boolean isLocal() -
doMonitor
Description copied from interface:CacheCustom metrics not covered by CacheStats may be emitted by this method.
-