Package org.apache.maven.plugins.clean
Class Cleaner.BackgroundCleaner
- java.lang.Object
-
- java.lang.Thread
-
- org.apache.maven.plugins.clean.Cleaner.BackgroundCleaner
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- Cleaner
private static class Cleaner.BackgroundCleaner extends java.lang.Thread
-
-
Field Summary
Fields Modifier and Type Field Description private Cleanercleanerprivate java.lang.StringfastModeprivate java.util.Deque<java.io.File>filesToDeleteprivate static Cleaner.BackgroundCleanerinstanceprivate static intNEWprivate static intRUNNINGprivate intstatusprivate static intSTOPPED
-
Constructor Summary
Constructors Modifier Constructor Description privateBackgroundCleaner(Cleaner cleaner, java.io.File dir, java.lang.String fastMode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voiddelete(Cleaner cleaner, java.io.File dir, java.lang.String fastMode)(package private) booleandoDelete(java.io.File dir)(package private) voiddoSessionEnd()(package private) voidinit(java.io.File fastDir, java.io.File dir)(package private) java.io.FilepollNext()voidrun()(package private) static voidsessionEnd()private voidwrapExecutionListener()If this has not been done already, we wrap the ExecutionListener inside a proxy which simply delegates call to the previous listener.-
Methods 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, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
instance
private static Cleaner.BackgroundCleaner instance
-
filesToDelete
private final java.util.Deque<java.io.File> filesToDelete
-
cleaner
private final Cleaner cleaner
-
fastMode
private final java.lang.String fastMode
-
NEW
private static final int NEW
- See Also:
- Constant Field Values
-
RUNNING
private static final int RUNNING
- See Also:
- Constant Field Values
-
STOPPED
private static final int STOPPED
- See Also:
- Constant Field Values
-
status
private int status
-
-
Constructor Detail
-
BackgroundCleaner
private BackgroundCleaner(Cleaner cleaner, java.io.File dir, java.lang.String fastMode)
-
-
Method Detail
-
delete
public static void delete(Cleaner cleaner, java.io.File dir, java.lang.String fastMode)
-
sessionEnd
static void sessionEnd()
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
init
void init(java.io.File fastDir, java.io.File dir)
-
pollNext
java.io.File pollNext()
-
doDelete
boolean doDelete(java.io.File dir)
-
wrapExecutionListener
private void wrapExecutionListener()
If this has not been done already, we wrap the ExecutionListener inside a proxy which simply delegates call to the previous listener. When the session ends, it will also callsessionEnd(). There's no clean API to do that properly as this is a very unusual use case for a plugin to outlive its main execution.
-
doSessionEnd
void doSessionEnd()
-
-