|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.accumulo.core.file.blockfile.cache.SimpleBlockCache
public class SimpleBlockCache
Simple one RFile soft reference cache.
Field Summary | |
---|---|
int |
dumps
|
Constructor Summary | |
---|---|
SimpleBlockCache()
Constructor |
Method Summary | |
---|---|
org.apache.accumulo.core.file.blockfile.cache.SimpleBlockCache.SimpleCacheEntry |
cacheBlock(String blockName,
byte[] buf)
Add block to cache (defaults to not in-memory). |
org.apache.accumulo.core.file.blockfile.cache.SimpleBlockCache.SimpleCacheEntry |
cacheBlock(String blockName,
byte[] buf,
boolean inMemory)
Add block to cache. |
org.apache.accumulo.core.file.blockfile.cache.SimpleBlockCache.SimpleCacheEntry |
getBlock(String blockName)
Fetch block from cache. |
long |
getMaxSize()
Get the maximum size of this 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 org.apache.accumulo.core.file.blockfile.cache.SimpleBlockCache.SimpleCacheEntry getBlock(String blockName)
BlockCache
getBlock
in interface BlockCache
blockName
- Block number to fetch.
public org.apache.accumulo.core.file.blockfile.cache.SimpleBlockCache.SimpleCacheEntry cacheBlock(String blockName, byte[] buf)
BlockCache
cacheBlock
in interface BlockCache
blockName
- Zero-based file block number.buf
- The block contents wrapped in a ByteBuffer.public org.apache.accumulo.core.file.blockfile.cache.SimpleBlockCache.SimpleCacheEntry cacheBlock(String blockName, byte[] 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
public long getMaxSize()
BlockCache
getMaxSize
in interface BlockCache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |