|
||||||||||
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,
byte[] buf)
Add block to cache (defaults to not in-memory). |
void |
cacheBlock(String blockName,
byte[] buf,
boolean inMemory)
Add block to cache. |
byte[] |
getBlock(String blockName)
Fetch block from cache. |
void |
shutdown()
Shutdown the cache. |
Method Detail |
---|
void 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-memoryvoid cacheBlock(String blockName, byte[] buf)
blockName
- Zero-based file block number.buf
- The block contents wrapped in a ByteBuffer.byte[] getBlock(String blockName)
blockName
- Block number to fetch.
void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |