|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BlockCache
Block cache interface. TODO: Add filename or hash of filename to block cache key.
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. |
Method Detail |
---|
void cacheBlock(String blockName, ByteBuffer 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-memoryvoid cacheBlock(String blockName, ByteBuffer buf)
blockName
- Zero-based file block number.buf
- The block contents wrapped in a ByteBuffer.ByteBuffer getBlock(String blockName, boolean caching)
blockName
- Block number to fetch.caching
- Whether this request has caching enabled (used for stats)
void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |