public abstract class BlockCacheManager extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
BlockCacheManager.Configuration |
Modifier and Type | Field and Description |
---|---|
static String |
CACHE_PROPERTY_BASE |
Constructor and Description |
---|
BlockCacheManager() |
Modifier and Type | Method and Description |
---|---|
protected abstract BlockCache |
createCache(BlockCacheManager.Configuration conf,
CacheType type)
Create a block cache using the supplied configuration
|
BlockCache |
getBlockCache(CacheType type)
Get the block cache of the given type
|
static String |
getFullyQualifiedPropertyPrefix(String prefix)
A convenience method that returns a string of the from
tserver.cache.config.<prefix>.default. this method is useful for configuring a cache
manager. |
static String |
getFullyQualifiedPropertyPrefix(String prefix,
CacheType type)
A convenience method that returns a string of the from
tserver.cache.config.<prefix>.<type>. this method is useful for configuring a cache
manager. |
void |
start(BlockCacheManager.Configuration conf)
Initialize the caches for each CacheType based on the configuration
|
void |
stop()
Stop caches and release resources
|
public static final String CACHE_PROPERTY_BASE
public void start(BlockCacheManager.Configuration conf)
conf
- accumulo configurationpublic void stop()
public BlockCache getBlockCache(CacheType type)
type
- block cache typeprotected abstract BlockCache createCache(BlockCacheManager.Configuration conf, CacheType type)
conf
- cache configurationpublic static String getFullyQualifiedPropertyPrefix(String prefix)
tserver.cache.config.<prefix>.default.
this method is useful for configuring a cache
manager.prefix
- A unique identifier that corresponds to a particular BlockCacheManager implementation.BlockCacheManager.Configuration.getProperties(String, CacheType)
public static String getFullyQualifiedPropertyPrefix(String prefix, CacheType type)
tserver.cache.config.<prefix>.<type>.
this method is useful for configuring a cache
manager.prefix
- A unique identifier that corresponds to a particular BlockCacheManager implementation.BlockCacheManager.Configuration.getProperties(String, CacheType)
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.