public class DefaultResourceCleaner<T> extends Object implements ResourceCleaner
DefaultResourceCleaner
is the default implementation of ResourceCleaner
. It will
try to clean up any resource that was added. Failure will result in an individual retry of the
cleanup. The overall cleanup result succeeds after all subtasks succeeded.Modifier and Type | Class and Description |
---|---|
static class |
DefaultResourceCleaner.Builder<T>
Builder for creating DefaultResourceCleaner instances. |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
cleanupAsync(JobID jobId)
Cleans job-related data from resources asynchronously.
|
static DefaultResourceCleaner.Builder<GloballyCleanableResource> |
forGloballyCleanableResources(ComponentMainThreadExecutor mainThreadExecutor,
Executor cleanupExecutor,
RetryStrategy retryStrategy) |
static DefaultResourceCleaner.Builder<LocallyCleanableResource> |
forLocallyCleanableResources(ComponentMainThreadExecutor mainThreadExecutor,
Executor cleanupExecutor,
RetryStrategy retryStrategy) |
public static DefaultResourceCleaner.Builder<LocallyCleanableResource> forLocallyCleanableResources(ComponentMainThreadExecutor mainThreadExecutor, Executor cleanupExecutor, RetryStrategy retryStrategy)
public static DefaultResourceCleaner.Builder<GloballyCleanableResource> forGloballyCleanableResources(ComponentMainThreadExecutor mainThreadExecutor, Executor cleanupExecutor, RetryStrategy retryStrategy)
public CompletableFuture<Void> cleanupAsync(JobID jobId)
ResourceCleaner
cleanupAsync
in interface ResourceCleaner
jobId
- The JobID
referring to the job for which the data shall be cleaned up.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.