public interface DiskCache
| Modifier and Type | Method and Description |
|---|---|
void |
abortEdit(CacheEntry cacheEntry)
abort edit
|
void |
abortEdit(java.lang.String key)
abort edit by key
|
CacheEntry |
beginEdit(java.lang.String key)
begin edit an
|
void |
clear()
clear all data
|
void |
close()
close the cache
|
void |
commitEdit(CacheEntry cacheEntry)
abort edit by key
|
boolean |
delete(java.lang.String key)
delete if key exist, under edit can not be deleted
|
void |
flush()
flush data to dish
|
long |
getCapacity() |
java.io.File |
getDirectory() |
CacheEntry |
getEntry(java.lang.String key) |
long |
getSize() |
boolean |
has(java.lang.String key)
Check if has this key
|
void |
open()
open disk cache
|
boolean has(java.lang.String key)
key - void open()
throws java.io.IOException
java.io.IOExceptionvoid clear()
throws java.io.IOException
java.io.IOExceptionvoid close()
throws java.io.IOException
java.io.IOExceptionvoid flush()
throws java.io.IOException
java.io.IOExceptionCacheEntry getEntry(java.lang.String key) throws java.io.IOException
key - java.io.IOExceptionCacheEntry beginEdit(java.lang.String key) throws java.io.IOException
key - java.io.IOExceptionvoid abortEdit(CacheEntry cacheEntry)
cacheEntry - void abortEdit(java.lang.String key)
key - void commitEdit(CacheEntry cacheEntry) throws java.io.IOException
java.io.IOExceptionboolean delete(java.lang.String key)
throws java.io.IOException
key - java.io.IOExceptionlong getCapacity()
long getSize()
java.io.File getDirectory()