|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.hfile.SimpleBlockCache
public class SimpleBlockCache
Simple one RFile soft reference cache.
Field Summary | |
---|---|
int |
dumps
|
Constructor Summary | |
---|---|
SimpleBlockCache()
Constructor |
Method Summary | |
---|---|
void |
cacheBlock(String blockName,
ByteBuffer buf)
Add block to cache (defaults to not in-memory). |
void |
cacheBlock(String blockName,
ByteBuffer buf,
boolean inMemory)
Add block to cache. |
ByteBuffer |
getBlock(String blockName,
boolean caching)
Fetch block from cache. |
void |
shutdown()
Shutdown the cache. |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int dumps
Constructor Detail |
---|
public SimpleBlockCache()
Method Detail |
---|
public int size()
public ByteBuffer getBlock(String blockName, boolean caching)
BlockCache
getBlock
in interface BlockCache
blockName
- Block number to fetch.caching
- Whether this request has caching enabled (used for stats)
public void cacheBlock(String blockName, ByteBuffer buf)
BlockCache
cacheBlock
in interface BlockCache
blockName
- Zero-based file block number.buf
- The block contents wrapped in a ByteBuffer.public void cacheBlock(String blockName, ByteBuffer buf, boolean inMemory)
BlockCache
cacheBlock
in interface BlockCache
blockName
- Zero-based file block number.buf
- The block contents wrapped in a ByteBuffer.inMemory
- Whether block should be treated as in-memorypublic void shutdown()
BlockCache
shutdown
in interface BlockCache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |