|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dcm4che2.filecache.FileCache
public class FileCache
Constructor Summary | |
---|---|
FileCache()
|
Method Summary | |
---|---|
void |
clearCache()
Delete everything in the cache |
static boolean |
deleteFileAndParents(java.io.File f,
java.io.File baseDir)
|
static boolean |
deleteFileOrDirectory(java.io.File f)
|
static void |
deleteFilesOrDirectories(java.io.File[] files)
|
long |
free(long size)
Free at least the indicated number of bytes from the filesystem, using an LRU algorithm |
java.io.File |
getCacheRootDir()
|
java.lang.String |
getJournalFileName()
|
java.lang.String |
getJournalFilePathFormat()
|
java.io.File |
getJournalRootDir()
|
long |
getMaximumFreeTime()
Gets the maximum free time that a free should take, before another process can assume it is failed/gone, in ms Default: 1 hour. |
boolean |
isEmpty()
|
protected boolean |
multiProcessFreeIsRunningFile()
Return true if the free is running file was created, or is very old. |
void |
record(java.io.File f)
Record a newly created file in the journaling cache, (default instance) |
void |
record(java.io.File f,
boolean update)
Record a file in the journaling cache, touching it to update the timestamp if update is true. |
void |
setCacheRootDir(java.io.File cacheRootDir)
|
void |
setJournalFileName(java.lang.String journalFileName)
|
void |
setJournalFilePathFormat(java.lang.String format)
|
void |
setJournalRootDir(java.io.File journalRootDir)
Sets the journal directory to store information about newly created files. |
void |
setMaximumFreeTime(long maximumFreeTime)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileCache()
Method Detail |
---|
public java.io.File getJournalRootDir()
public void setJournalRootDir(java.io.File journalRootDir)
journalRootDir
- public java.lang.String getJournalFileName()
public void setJournalFileName(java.lang.String journalFileName)
public java.io.File getCacheRootDir()
public void setCacheRootDir(java.io.File cacheRootDir)
public java.lang.String getJournalFilePathFormat()
public void setJournalFilePathFormat(java.lang.String format)
public void record(java.io.File f) throws java.io.IOException
java.io.IOException
public void record(java.io.File f, boolean update) throws java.io.IOException
java.io.IOException
protected boolean multiProcessFreeIsRunningFile()
public long getMaximumFreeTime()
public void setMaximumFreeTime(long maximumFreeTime)
public long free(long size) throws java.io.IOException
java.io.IOException
public void clearCache()
public boolean isEmpty()
public static void deleteFilesOrDirectories(java.io.File[] files)
public static boolean deleteFileOrDirectory(java.io.File f)
public static boolean deleteFileAndParents(java.io.File f, java.io.File baseDir)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |