Class FileCleaner
java.lang.Object
java.lang.Thread
org.exoplatform.commons.file.resource.WorkerThread
org.exoplatform.commons.file.resource.FileCleaner
- All Implemented Interfaces:
Runnable
Created by The eXo Platform SAS.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ConcurrentMap<String, WeakReference<File>> In-share files database.protected static final longprotected final ConcurrentLinkedQueue<File> protected static final org.exoplatform.services.log.LogFields inherited from class org.exoplatform.commons.file.resource.WorkerThread
stopped, timeoutFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionFileCleaner(boolean start) FileCleaner(long timeout) FileCleaner(long timeout, boolean start) FileCleaner(String id, long timeout, boolean start) FileCleaner(String prefix, org.exoplatform.container.ExoContainerContext ctx, long timeout) FileCleaner(org.exoplatform.container.ExoContainerContext ctx) -
Method Summary
Methods inherited from class org.exoplatform.commons.file.resource.WorkerThread
runMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
DEFAULT_TIMEOUT
protected static final long DEFAULT_TIMEOUT- See Also:
-
LOG
protected static final org.exoplatform.services.log.Log LOG -
CURRENT_SWAP_FILES
In-share files database. -
files
-
-
Constructor Details
-
FileCleaner
public FileCleaner() -
FileCleaner
public FileCleaner(org.exoplatform.container.ExoContainerContext ctx) -
FileCleaner
public FileCleaner(long timeout) -
FileCleaner
-
FileCleaner
public FileCleaner(boolean start) -
FileCleaner
public FileCleaner(long timeout, boolean start) -
FileCleaner
-
-
Method Details
-
addFile
- Parameters:
file-
-
removeFile
- Parameters:
file-
-
halt
public void halt()- Overrides:
haltin classWorkerThread
-
callPeriodically
- Specified by:
callPeriodicallyin classWorkerThread- Throws:
Exception- See Also:
-