Package org.terracotta.utilities.io
Class Files.RetryingDeleteTask
- All Implemented Interfaces:
Runnable,Future<Void>,RunnableFuture<Void>
- Enclosing class:
- Files
Task to perform a background deletion. This task resubmits itself if the deletion, after retry, fails
delete the file/directory.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Pathprivate final ExecutorServiceprivate static final intprivate final Runnableprivate final booleanprivate final Predicate<FileSystemException> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRetryingDeleteTask(ExecutorService executor, Callable<Void> deletionTask, Path deletionPath, boolean retryDirNotEmpty, Runnable progressHelper) -
Method Summary
Methods inherited from class java.util.concurrent.FutureTask
cancel, done, get, get, isCancelled, isDone, runAndReset, set, setException, toString
-
Field Details
-
LOGGING_SUPPRESSION_FACTOR
private static final int LOGGING_SUPPRESSION_FACTOR- See Also:
-
executor
-
task
-
deletionPath
-
retryDirNotEmpty
private final boolean retryDirNotEmpty -
progressHelper
-
shouldLog
-
-
Constructor Details
-
RetryingDeleteTask
private RetryingDeleteTask(ExecutorService executor, Callable<Void> deletionTask, Path deletionPath, boolean retryDirNotEmpty, Runnable progressHelper)
-
-
Method Details
-
run
public void run()- Specified by:
runin interfaceRunnable- Specified by:
runin interfaceRunnableFuture<Void>- Overrides:
runin classFutureTask<Void>
-
logFailedAttempt
-