|
||||||||||
| 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)
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)
BlockCache
getBlock in interface BlockCacheblockName - Block number to fetch.
public void cacheBlock(String blockName,
ByteBuffer buf)
BlockCache
cacheBlock in interface BlockCacheblockName - 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 BlockCacheblockName - 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 | |||||||||