@FunctionalInterface public interface GloballyCleanableResource
GloballyCleanableResource
is supposed to be implemented by any class that provides
artifacts for a given job that need to be cleaned up after the job reached a global terminal
state.LocallyCleanableResource
,
JobStatus
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
globalCleanupAsync(JobID jobId,
Executor cleanupExecutor)
globalCleanupAsync is expected to be called from the main thread. |
CompletableFuture<Void> globalCleanupAsync(JobID jobId, Executor cleanupExecutor)
globalCleanupAsync
is expected to be called from the main thread. Heavy IO tasks
should be outsourced into the passed cleanupExecutor
. Thread-safety must be ensured.jobId
- The JobID
of the job for which the local data should be cleaned up.cleanupExecutor
- The fallback executor for IO-heavy operations.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.