Class Cleaner.BackgroundCleaner

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    Cleaner

    private static class Cleaner.BackgroundCleaner
    extends java.lang.Thread
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private BackgroundCleaner​(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 void delete​(Cleaner cleaner, java.io.File dir, java.lang.String fastMode)  
      (package private) boolean doDelete​(java.io.File dir)  
      (package private) void doSessionEnd()  
      (package private) void init​(java.io.File fastDir, java.io.File dir)  
      (package private) java.io.File pollNext()  
      void run()  
      (package private) static void sessionEnd()  
      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.
      • 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
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.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 call sessionEnd(). 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()