T - The type of poll response value.U - The type of the final result of long-running operation.public interface SyncPoller<T,U>
It provides the following functionality:
| Modifier and Type | Method and Description |
|---|---|
void |
cancelOperation()
cancels the remote long-running operation if cancellation is supported by the service.
|
U |
getFinalResult()
Retrieve the final result of the long running operation.
|
PollResponse<T> |
poll()
Poll once and return the poll response received.
|
PollResponse<T> |
waitForCompletion()
Wait for polling to complete.
|
PollResponse<T> |
waitForCompletion(Duration timeout)
Wait for polling to complete with a timeout.
|
PollResponse<T> |
waitUntil(Duration timeout,
LongRunningOperationStatus statusToWaitFor)
Wait for the given
LongRunningOperationStatus. |
PollResponse<T> |
waitUntil(LongRunningOperationStatus statusToWaitFor)
Wait for the given
LongRunningOperationStatus to receive. |
PollResponse<T> poll()
PollResponse<T> waitForCompletion()
LongRunningOperationStatus.PollResponse<T> waitForCompletion(Duration timeout)
LongRunningOperationStatus.timeout - the duration to waits for polling completion.TimeoutException - TimeoutException will be thrown if polling
does not complete within the given Duration.PollResponse<T> waitUntil(LongRunningOperationStatus statusToWaitFor)
LongRunningOperationStatus to receive.statusToWaitFor - the desired LongRunningOperationStatus to block for.PollResponse whose PollResponse.getStatus() matches statusToWaitFor.IllegalArgumentException - if statusToWaitFor is null.PollResponse<T> waitUntil(Duration timeout, LongRunningOperationStatus statusToWaitFor)
LongRunningOperationStatus.timeout - the duration to waits for the polling.statusToWaitFor - the desired LongRunningOperationStatus to block for.PollResponse whose PollResponse.getStatus() matches statusToWaitFor.IllegalArgumentException - if statusToWaitFor is or timeout null.TimeoutException - TimeoutException will be thrown if polling
does not find the matching status within the given Duration.U getFinalResult()
void cancelOperation()
Copyright © 2019 Microsoft Corporation. All rights reserved.