Package com.atlan.model.core
Interface AtlanAsyncMutator
- All Known Implementing Classes:
AssetDeletionResponse,AsyncCreationResponse
public interface AtlanAsyncMutator
Interface implemented by asynchronous operations to allow blocking behavior.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum number of times to retry for async operations. -
Method Summary
Modifier and TypeMethodDescriptionblock()Block until the mutating operation is confirmed to be completed.static voidblockForBackgroundTasks(AtlanClient client, List<String> guids, int maxRetries, org.slf4j.Logger logger) Block until any pending or in-progress background tasks for the given guids are completed.
-
Field Details
-
MAX_ASYNC_RETRIES
static final int MAX_ASYNC_RETRIESMaximum number of times to retry for async operations.- See Also:
-
-
Method Details
-
block
Block until the mutating operation is confirmed to be completed. Note that in most cases this will make additional API calls to confirm the mutation is complete, and therefore will add extra load and potential delays to program execution. In general, it will retry confirming the operation has completed up to the maximum defined by Atlan.getMaxNetworkRetries()- Returns:
- the original mutation response, only after the changes are confirmed
- Throws:
ApiException- if the retry loop is interrupted or the maximum number of retries is hit
-
blockForBackgroundTasks
static void blockForBackgroundTasks(AtlanClient client, List<String> guids, int maxRetries, org.slf4j.Logger logger) throws InterruptedException, ApiException Block until any pending or in-progress background tasks for the given guids are completed.- Parameters:
client- connectivity to the Atlan tenant on which to run the task checksguids- list of guids to check for background tasksmaxRetries- maximum number of retries to wait for the background tasks to completelogger- through which to record progress- Throws:
InterruptedException- if the retry loop is interruptedApiException- if the maximum number of retries is hit without the background tasks being completed
-