public interface BlockCache
Modifier and Type | Method and Description |
---|---|
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.
|
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()
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.