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.
|
default SyncPoller<T,U> |
setPollInterval(Duration pollInterval)
Sets the poll interval for this poller.
|
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.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.U getFinalResult()
void cancelOperation()
default SyncPoller<T,U> setPollInterval(Duration pollInterval)
pollInterval - The new poll interval for this poller.SyncPoller.NullPointerException - if the pollInterval is null.IllegalArgumentException - if the pollInterval is zero or negative.Copyright © 2021 Microsoft Corporation. All rights reserved.