public class OnHeapNamespaceExtractionCacheManager extends NamespaceExtractionCacheManager
dataSize, fnCache, implData, serviceEmitter, tasksStarted
Constructor and Description |
---|
OnHeapNamespaceExtractionCacheManager(com.metamx.common.lifecycle.Lifecycle lifecycle,
ConcurrentMap<String,com.google.common.base.Function<String,String>> fnCache,
com.metamx.emitter.service.ServiceEmitter emitter,
Map<Class<? extends ExtractionNamespace>,ExtractionNamespaceFunctionFactory<?>> namespaceFunctionFactoryMap) |
Modifier and Type | Method and Description |
---|---|
boolean |
delete(String namespaceKey)
Clears out resources used by the namespace such as threads.
|
ConcurrentMap<String,String> |
getCacheMap(String namespaceOrCacheKey)
Return a ConcurrentMap with the specified ID (either namespace's name or a cache key ID)
|
protected boolean |
swapAndClearCache(String namespaceKey,
String cacheKey)
This method is expected to swap the cacheKey into the active namespace, and leave future requests for new cacheKey available.
|
getKnownNamespaces, getPostRunnable, getVersion, schedule, schedule, scheduleOrUpdate, waitForServiceToEnd
@Inject public OnHeapNamespaceExtractionCacheManager(com.metamx.common.lifecycle.Lifecycle lifecycle, ConcurrentMap<String,com.google.common.base.Function<String,String>> fnCache, com.metamx.emitter.service.ServiceEmitter emitter, Map<Class<? extends ExtractionNamespace>,ExtractionNamespaceFunctionFactory<?>> namespaceFunctionFactoryMap)
protected boolean swapAndClearCache(String namespaceKey, String cacheKey)
NamespaceExtractionCacheManager
swapAndClearCache
in class NamespaceExtractionCacheManager
namespaceKey
- The namespace to swap the cache intocacheKey
- The cacheKey that contains the data of interestpublic ConcurrentMap<String,String> getCacheMap(String namespaceOrCacheKey)
NamespaceExtractionCacheManager
getCacheMap
in class NamespaceExtractionCacheManager
namespaceOrCacheKey
- Either a namespace or cache key should be acceptable here.public boolean delete(String namespaceKey)
NamespaceExtractionCacheManager
delete
in class NamespaceExtractionCacheManager
namespaceKey
- The namespace to be deletedCopyright © 2011–2015. All rights reserved.