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:
Runnable
- Enclosing class:
Cleaner
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Cleanerprivate final Stringprivate static Cleaner.BackgroundCleanerprivate static final intprivate static final intprivate intprivate static final intFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBackgroundCleaner(Cleaner cleaner, Path dir, String fastMode) -
Method Summary
Modifier and TypeMethodDescriptionstatic void(package private) boolean(package private) void(package private) void(package private) PathpollNext()voidrun()(package private) static voidprivate voidIf 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, 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
-
Field Details
-
NEW
private static final int NEW- See Also:
-
RUNNING
private static final int RUNNING- See Also:
-
STOPPED
private static final int STOPPED- See Also:
-
instance
-
filesToDelete
-
cleaner
-
fastMode
-
status
private int status
-
-
Constructor Details
-
BackgroundCleaner
- Throws:
IOException
-
-
Method Details
-
delete
- Throws:
IOException
-
sessionEnd
static void sessionEnd() -
run
public void run() -
init
- Throws:
IOException
-
pollNext
Path pollNext() -
doDelete
-
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()
-