public interface Cache
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.
|
void |
releaseResources()
Release any resources associated with the cache.
|
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.
|
void delete(String name)
name
- cache file namevoid update(String name, long blockId, int blockOffset, byte[] buffer, int offset, int length)
boolean fetch(String name, long blockId, int blockOffset, byte[] b, int off, int lengthToReadInBlock)
long size()
void renameCacheFile(String source, String dest)
source
- original namedest
- final namevoid releaseResources()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.