Class BlockCacheManager
- java.lang.Object
-
- org.apache.accumulo.core.spi.cache.BlockCacheManager
-
- Direct Known Subclasses:
LruBlockCacheManager
,TinyLfuBlockCacheManager
public abstract class BlockCacheManager extends Object
- Since:
- 2.0.0
- See Also:
org.apache.accumulo.core.spi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
BlockCacheManager.Configuration
-
Constructor Summary
Constructors Constructor Description BlockCacheManager()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract BlockCache
createCache(BlockCacheManager.Configuration conf, CacheType type)
Create a block cache using the supplied configurationBlockCache
getBlockCache(CacheType type)
Get the block cache of the given typestatic String
getFullyQualifiedPropertyPrefix(String prefix)
Deprecated.since 2.1.0 because this method does not support scan servers, only tservers.static String
getFullyQualifiedPropertyPrefix(String prefix, CacheType type)
Deprecated.since 2.1.0 because this method does not support scan servers, only tservers.void
start(BlockCacheManager.Configuration conf)
Initialize the caches for each CacheType based on the configurationvoid
stop()
Stop caches and release resources
-
-
-
Method Detail
-
start
public void start(BlockCacheManager.Configuration conf)
Initialize the caches for each CacheType based on the configuration- Parameters:
conf
- accumulo configuration
-
stop
public void stop()
Stop caches and release resources
-
getBlockCache
public BlockCache getBlockCache(CacheType type)
Get the block cache of the given type- Parameters:
type
- block cache type- Returns:
- BlockCache or null if not enabled
-
createCache
protected abstract BlockCache createCache(BlockCacheManager.Configuration conf, CacheType type)
Create a block cache using the supplied configuration- Parameters:
conf
- cache configuration- Returns:
- configured block cache
-
getFullyQualifiedPropertyPrefix
@Deprecated(since="2.1.0") public static String getFullyQualifiedPropertyPrefix(String prefix)
Deprecated.since 2.1.0 because this method does not support scan servers, only tservers. UseBlockCacheManager.Configuration.getProperties(String, CacheType)
instead.A convenience method that returns a string of the fromtserver.cache.config.<prefix>.default.
this method is useful for configuring a cache manager.- Parameters:
prefix
- A unique identifier that corresponds to a particular BlockCacheManager implementation.- See Also:
BlockCacheManager.Configuration.getProperties(String, CacheType)
-
getFullyQualifiedPropertyPrefix
@Deprecated(since="2.1.0") public static String getFullyQualifiedPropertyPrefix(String prefix, CacheType type)
Deprecated.since 2.1.0 because this method does not support scan servers, only tservers. UseBlockCacheManager.Configuration.getProperties(String, CacheType)
instead.A convenience method that returns a string of the fromtserver.cache.config.<prefix>.<type>.
this method is useful for configuring a cache manager.- Parameters:
prefix
- A unique identifier that corresponds to a particular BlockCacheManager implementation.- See Also:
BlockCacheManager.Configuration.getProperties(String, CacheType)
-
-