|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.blur.store.blockcache_v2.Cache
public abstract class Cache
Constructor Summary | |
---|---|
Cache()
|
Method Summary | |
---|---|
abstract boolean |
cacheFileForReading(CacheDirectory directory,
String fileName,
org.apache.lucene.store.IOContext context)
Checks whether file should be cached or not during reading. |
abstract boolean |
cacheFileForWriting(CacheDirectory directory,
String fileName,
org.apache.lucene.store.IOContext context)
Checks whether file should be cached or not during writing. |
abstract void |
fileClosedForWriting(CacheDirectory directory,
String fileName,
long fileId)
The cache internals rely on the last modified timestamp of a given file to know if the file is the same or not. |
abstract CacheValue |
get(CacheKey key)
Gets the cache value for the given key. |
abstract int |
getCacheBlockSize(CacheDirectory directory,
String fileName)
Get capacity of each cache entry for the given file. |
abstract int |
getFileBufferSize(CacheDirectory directory,
String fileName)
Gets buffer size of the buffer used while interacting with the underlying directory. |
abstract long |
getFileId(CacheDirectory directory,
String fileName)
Gets unique id for the given file. |
abstract CacheValue |
getQuietly(CacheKey key)
Gets the cache value for the given key. |
CacheValue |
newInstance(CacheDirectory directory,
String fileName)
Creates a new instance of CacheValue, the cache capacity should be used for the given file. |
abstract CacheValue |
newInstance(CacheDirectory directory,
String fileName,
int cacheBlockSize)
Creates a new instance of CacheValue, the cache capacity should be used for the given file. |
abstract void |
put(CacheKey key,
CacheValue value)
Puts the cache entry into the cache. |
abstract void |
releaseDirectory(String directoryName)
This is called when the CacheDirectory is finalized. |
abstract void |
removeFile(CacheDirectory directory,
String fileName)
Removes the file from the cache. |
abstract boolean |
shouldBeQuiet(CacheDirectory directory,
String fileName)
Determines if the reader should be quiet or not. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.io.Closeable |
---|
close |
Constructor Detail |
---|
public Cache()
Method Detail |
---|
public CacheValue newInstance(CacheDirectory directory, String fileName)
directory
- the directory.fileName
- the file name.
public abstract CacheValue newInstance(CacheDirectory directory, String fileName, int cacheBlockSize)
directory
- the directory.fileName
- the file name.cacheBlockSize
- the length of the CacheValue
.
public abstract long getFileId(CacheDirectory directory, String fileName) throws IOException
directory
- the directory.fileName
- the file name.
IOException
public abstract int getCacheBlockSize(CacheDirectory directory, String fileName)
directory
- the directory.fileName
- the file name.
public abstract int getFileBufferSize(CacheDirectory directory, String fileName)
directory
- the directory.fileName
- the file name.
public abstract boolean cacheFileForReading(CacheDirectory directory, String fileName, org.apache.lucene.store.IOContext context)
directory
- the directory.fileName
- the file name.context
- the IOContext from Lucene.
public abstract boolean cacheFileForWriting(CacheDirectory directory, String fileName, org.apache.lucene.store.IOContext context)
directory
- the directory.fileName
- the file name.context
- the IOContext from Lucene.
public abstract CacheValue get(CacheKey key)
key
- the key.
public abstract CacheValue getQuietly(CacheKey key)
key
- the key.
public abstract void put(CacheKey key, CacheValue value)
key
- the key.value
- the value.public abstract void removeFile(CacheDirectory directory, String fileName) throws IOException
directory
- the directory.fileName
- the file name.
IOException
public abstract void releaseDirectory(String directoryName)
directoryName
- the directory name.public abstract boolean shouldBeQuiet(CacheDirectory directory, String fileName)
directory
- the directory.fileName
- the file name.
public abstract void fileClosedForWriting(CacheDirectory directory, String fileName, long fileId) throws IOException
fileId
- the file id.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |