org.apache.accumulo.core.file.blockfile.cache
public interface BlockCache
Modifier and Type | Method and Description |
---|---|
CacheEntry |
cacheBlock(String blockName,
byte[] buf)
Add block to cache (defaults to not in-memory).
|
CacheEntry |
cacheBlock(String blockName,
byte[] buf,
boolean inMemory)
Add block to cache.
|
CacheEntry |
getBlock(String blockName)
Fetch block from cache.
|
long |
getMaxSize()
Get the maximum size of this cache.
|
void |
shutdown()
Shutdown the cache.
|
CacheEntry cacheBlock(String blockName, byte[] buf, boolean inMemory)
blockName
- Zero-based file block number.buf
- The block contents wrapped in a ByteBuffer.inMemory
- Whether block should be treated as in-memoryCacheEntry cacheBlock(String blockName, byte[] buf)
blockName
- Zero-based file block number.buf
- The block contents wrapped in a ByteBuffer.CacheEntry getBlock(String blockName)
blockName
- Block number to fetch.void shutdown()
long getMaxSize()
Copyright © 2011-2015 The Apache Software Foundation. All Rights Reserved.