Class Files.RetryingDeleteTask

  • All Implemented Interfaces:
    java.lang.Runnable, java.util.concurrent.Future<java.lang.Void>, java.util.concurrent.RunnableFuture<java.lang.Void>
    Enclosing class:
    Files

    private static class Files.RetryingDeleteTask
    extends java.util.concurrent.FutureTask<java.lang.Void>
    Task to perform a background deletion. This task resubmits itself if the deletion, after retry, fails delete the file/directory.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private RetryingDeleteTask​(java.util.concurrent.ExecutorService executor, java.util.concurrent.Callable<java.lang.Void> deletionTask, java.nio.file.Path deletionPath, boolean retryDirNotEmpty, java.lang.Runnable progressHelper)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void logFailedAttempt​(java.nio.file.FileSystemException t)  
      void run()  
      • Methods inherited from class java.util.concurrent.FutureTask

        cancel, done, get, get, isCancelled, isDone, runAndReset, set, setException, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • LOGGING_SUPPRESSION_FACTOR

        private static final int LOGGING_SUPPRESSION_FACTOR
        See Also:
        Constant Field Values
      • executor

        private final java.util.concurrent.ExecutorService executor
      • task

        private final java.util.concurrent.Callable<java.lang.Void> task
      • deletionPath

        private final java.nio.file.Path deletionPath
      • retryDirNotEmpty

        private final boolean retryDirNotEmpty
      • progressHelper

        private final java.lang.Runnable progressHelper
      • shouldLog

        private final java.util.function.Predicate<java.nio.file.FileSystemException> shouldLog
    • Constructor Detail

      • RetryingDeleteTask

        private RetryingDeleteTask​(java.util.concurrent.ExecutorService executor,
                                   java.util.concurrent.Callable<java.lang.Void> deletionTask,
                                   java.nio.file.Path deletionPath,
                                   boolean retryDirNotEmpty,
                                   java.lang.Runnable progressHelper)
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Specified by:
        run in interface java.util.concurrent.RunnableFuture<java.lang.Void>
        Overrides:
        run in class java.util.concurrent.FutureTask<java.lang.Void>
      • logFailedAttempt

        private void logFailedAttempt​(java.nio.file.FileSystemException t)