org.gcube.datatransformation.datatransformationlibrary.tmpfilemanagement
Class GarbageCollector
java.lang.Object
java.lang.Thread
org.gcube.datatransformation.datatransformationlibrary.tmpfilemanagement.GarbageCollector
- All Implemented Interfaces:
- Runnable
public class GarbageCollector
- extends Thread
- Author:
- Dimitris Katris, NKUA
Class which garbage collects temporary files.
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
GarbageCollector
public GarbageCollector(File tmpDirectory)
- Initializes the GarbageCollector
- Parameters:
tmpDirectory - The directory in which the GarbageCollector will garbage collect the files.
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
- See Also:
Thread.run()
forceTempFilesDeletion
protected void forceTempFilesDeletion()
configGCFileLifetime
public static void configGCFileLifetime(long filelifetime)
- Sets the lifetime of each temporary file.
- Parameters:
filelifetime - The lifetime of each temporary file.
configReGCollectInterval
public static void configReGCollectInterval(long reGCollectInterval)
- Sets the interval in which the GarbageCollector searches for files to delete.
- Parameters:
reGCollectInterval - The interval in which the GarbageCollector searches for files to delete.
Copyright © 2013. All Rights Reserved.