Package com.azure.core.util.polling
Class PollingContext<T>
java.lang.Object
com.azure.core.util.polling.PollingContext<T>
- Type Parameters:
T- the type of the poll response.
A key/value store that is propagated between various poll related operations associated with
PollerFlux and SyncPoller poller. The context also expose activation and
latest PollResponse.-
Method Summary
Modifier and TypeMethodDescriptionGets the activationPollResponseholding the result of an activation operation call.Get a value from the context with the provided key.Gets the latestPollResponsein the polling operation.Set a key-value pair in the context.
-
Method Details
-
getData
Get a value from the context with the provided key.- Parameters:
name- the key to look for- Returns:
- the value of the key if exists, else null
-
setData
Set a key-value pair in the context.- Parameters:
name- the keyvalue- the value- Returns:
- an updated PollingContext
-
getActivationResponse
Gets the activationPollResponseholding the result of an activation operation call.- Returns:
- The activation
PollResponseholding the result of an activation operation call.
-
getLatestResponse
Gets the latestPollResponsein the polling operation.- Returns:
- The latest
PollResponsein the polling operation.
-