Constructor and Description |
---|
BlockDirectoryCache(BlockCache blockCache,
String path,
Metrics metrics) |
Modifier and Type | Method and Description |
---|---|
void |
delete(String name)
Remove a file from the cache.
|
boolean |
fetch(String name,
long blockId,
int blockOffset,
byte[] b,
int off,
int lengthToReadInBlock)
Fetch the specified cache file content.
|
BlockCache |
getBlockCache()
Expert: mostly for tests
|
void |
renameCacheFile(String source,
String dest)
Expert: Rename the specified file in the cache.
|
long |
size()
Number of entries in the cache.
|
void |
update(String name,
long blockId,
int blockOffset,
byte[] buffer,
int offset,
int length)
Update the content of the specified cache file.
|
public BlockDirectoryCache(BlockCache blockCache, String path, Metrics metrics)
public BlockCache getBlockCache()
public void delete(String name)
Cache
public void update(String name, long blockId, int blockOffset, byte[] buffer, int offset, int length)
Cache
public boolean fetch(String name, long blockId, int blockOffset, byte[] b, int off, int lengthToReadInBlock)
Cache
public long size()
Cache
public void renameCacheFile(String source, String dest)
Cache
renameCacheFile
in interface Cache
source
- original namedest
- final nameCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.