-
Notifications
You must be signed in to change notification settings - Fork 224
/
com.azure.core.util.polling.SyncPoller.yml
202 lines (202 loc) · 27.9 KB
/
com.azure.core.util.polling.SyncPoller.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
### YamlMime:JavaType
uid: "com.azure.core.util.polling.SyncPoller"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>"
name: "SyncPoller<T,U>"
nameWithType: "SyncPoller<T,U>"
summary: "A type that offers API that simplifies the task of executing long-running operations against an Azure service."
syntax: "public interface **SyncPoller<T,U>**"
methods:
- uid: "com.azure.core.util.polling.SyncPoller.<T,U>createPoller(java.time.Duration,java.util.function.Function<com.azure.core.util.polling.PollingContext<T>,com.azure.core.util.polling.PollResponse<T>>,java.util.function.Function<com.azure.core.util.polling.PollingContext<T>,com.azure.core.util.polling.PollResponse<T>>,java.util.function.BiFunction<com.azure.core.util.polling.PollingContext<T>,com.azure.core.util.polling.PollResponse<T>,T>,java.util.function.Function<com.azure.core.util.polling.PollingContext<T>,U>)"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>.<T,U>createPoller(Duration pollInterval, Function<PollingContext<T>,PollResponse<T>> syncActivationOperation, Function<PollingContext<T>,PollResponse<T>> pollOperation, BiFunction<PollingContext<T>,PollResponse<T>,T> cancelOperation, Function<PollingContext<T>,U> fetchResultOperation)"
name: "<T,U>createPoller(Duration pollInterval, Function<PollingContext<T>,PollResponse<T>> syncActivationOperation, Function<PollingContext<T>,PollResponse<T>> pollOperation, BiFunction<PollingContext<T>,PollResponse<T>,T> cancelOperation, Function<PollingContext<T>,U> fetchResultOperation)"
nameWithType: "SyncPoller<T,U>.<T,U>createPoller(Duration pollInterval, Function<PollingContext<T>,PollResponse<T>> syncActivationOperation, Function<PollingContext<T>,PollResponse<T>> pollOperation, BiFunction<PollingContext<T>,PollResponse<T>,T> cancelOperation, Function<PollingContext<T>,U> fetchResultOperation)"
summary: "Creates default Sync<wbr>Poller."
modifiers:
- "static"
parameters:
- description: "the polling interval."
name: "pollInterval"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "the operation to synchronously activate (start) the long-running operation, this\n operation will be called with a new <xref uid=\"com.azure.core.util.polling.PollingContext\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollingContext\"></xref>."
name: "syncActivationOperation"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html\">Function</a><<xref href=\"com.azure.core.util.polling.PollingContext?alt=com.azure.core.util.polling.PollingContext&text=PollingContext\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>,<xref href=\"com.azure.core.util.polling.PollResponse?alt=com.azure.core.util.polling.PollResponse&text=PollResponse\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
- description: "the operation to poll the current state of long-running operation, this parameter is\n required and the operation will be called with current <xref uid=\"com.azure.core.util.polling.PollingContext\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollingContext\"></xref>."
name: "pollOperation"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html\">Function</a><<xref href=\"com.azure.core.util.polling.PollingContext?alt=com.azure.core.util.polling.PollingContext&text=PollingContext\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>,<xref href=\"com.azure.core.util.polling.PollResponse?alt=com.azure.core.util.polling.PollResponse&text=PollResponse\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
- description: "a <xref uid=\"java.util.function.Function\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Function\"></xref> that represents the operation to cancel the long-running operation if\n service supports cancellation, this parameter is required and if service does not support cancellation then the\n implementer should throw an exception with an error message indicating absence of cancellation support, the\n operation will be called with current <xref uid=\"com.azure.core.util.polling.PollingContext\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollingContext\"></xref>."
name: "cancelOperation"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/BiFunction.html\">BiFunction</a><<xref href=\"com.azure.core.util.polling.PollingContext?alt=com.azure.core.util.polling.PollingContext&text=PollingContext\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>,<xref href=\"com.azure.core.util.polling.PollResponse?alt=com.azure.core.util.polling.PollResponse&text=PollResponse\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
- description: "a <xref uid=\"java.util.function.Function\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Function\"></xref> that represents the operation to retrieve final result of the\n long-running operation if service support it, this parameter is required and operation will be called current\n <xref uid=\"com.azure.core.util.polling.PollingContext\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollingContext\"></xref>, if service does not have an api to fetch final result and if final result is same as\n final poll response value then implementer can choose to simply return value from provided final poll response."
name: "fetchResultOperation"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html\">Function</a><<xref href=\"com.azure.core.util.polling.PollingContext?alt=com.azure.core.util.polling.PollingContext&text=PollingContext\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>,<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />>"
syntax: "public static SyncPoller<T,U> <T,U>createPoller(Duration pollInterval, Function<PollingContext<T>,PollResponse<T>> syncActivationOperation, Function<PollingContext<T>,PollResponse<T>> pollOperation, BiFunction<PollingContext<T>,PollResponse<T>,T> cancelOperation, Function<PollingContext<T>,U> fetchResultOperation)"
desc: "Creates default SyncPoller."
returns:
description: "new <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref> instance."
type: "<xref href=\"com.azure.core.util.polling.SyncPoller?alt=com.azure.core.util.polling.SyncPoller&text=SyncPoller\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />,<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.core.util.polling.SyncPoller.<T,U>createPoller(java.time.Duration,java.util.function.Supplier<com.azure.core.http.rest.Response<?>>,com.azure.core.util.polling.SyncPollingStrategy<T,U>,com.azure.core.util.serializer.TypeReference<T>,com.azure.core.util.serializer.TypeReference<U>)"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>.<T,U>createPoller(Duration pollInterval, Supplier<Response<?>> initialOperation, SyncPollingStrategy<T,U> strategy, TypeReference<T> pollResponseType, TypeReference<U> resultType)"
name: "<T,U>createPoller(Duration pollInterval, Supplier<Response<?>> initialOperation, SyncPollingStrategy<T,U> strategy, TypeReference<T> pollResponseType, TypeReference<U> resultType)"
nameWithType: "SyncPoller<T,U>.<T,U>createPoller(Duration pollInterval, Supplier<Response<?>> initialOperation, SyncPollingStrategy<T,U> strategy, TypeReference<T> pollResponseType, TypeReference<U> resultType)"
summary: "Creates Poller<wbr>Flux."
modifiers:
- "static"
parameters:
- description: "the polling interval"
name: "pollInterval"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "the activation operation to activate (start) the long-running operation. This operation\n will be invoked at most once across all subscriptions. This parameter is required. If there is no specific\n activation work to be done then invocation should return null, this operation will be called with a new\n <xref uid=\"com.azure.core.util.polling.PollingContext\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollingContext\"></xref>."
name: "initialOperation"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html\">Supplier</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><?>>"
- description: "a known synchronous strategy for polling a long-running operation in Azure"
name: "strategy"
type: "<xref href=\"com.azure.core.util.polling.SyncPollingStrategy?alt=com.azure.core.util.polling.SyncPollingStrategy&text=SyncPollingStrategy\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />,<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />>"
- description: "the <xref uid=\"com.azure.core.util.serializer.TypeReference\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TypeReference\"></xref> of the response type from a polling call, or BinaryData if raw\n response body should be kept. This should match the generic parameter <xref uid=\"U\" data-throw-if-not-resolved=\"false\" data-raw-source=\"U\"></xref>."
name: "pollResponseType"
type: "<xref href=\"com.azure.core.util.serializer.TypeReference?alt=com.azure.core.util.serializer.TypeReference&text=TypeReference\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
- description: "the <xref uid=\"com.azure.core.util.serializer.TypeReference\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TypeReference\"></xref> of the final result object to deserialize into, or BinaryData if raw\n response body should be kept. This should match the generic parameter <xref uid=\"U\" data-throw-if-not-resolved=\"false\" data-raw-source=\"U\"></xref>."
name: "resultType"
type: "<xref href=\"com.azure.core.util.serializer.TypeReference?alt=com.azure.core.util.serializer.TypeReference&text=TypeReference\" data-throw-if-not-resolved=\"False\" /><<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />>"
syntax: "public static SyncPoller<T,U> <T,U>createPoller(Duration pollInterval, Supplier<Response<?>> initialOperation, SyncPollingStrategy<T,U> strategy, TypeReference<T> pollResponseType, TypeReference<U> resultType)"
desc: "Creates PollerFlux.\n\nThis method uses a <xref uid=\"com.azure.core.util.polling.SyncPollingStrategy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPollingStrategy\"></xref> to poll the status of a long-running operation after the activation operation is invoked. See <xref uid=\"com.azure.core.util.polling.SyncPollingStrategy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPollingStrategy\"></xref> for more details of known polling strategies and how to create a custom strategy."
returns:
description: "new <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref> instance."
type: "<xref href=\"com.azure.core.util.polling.SyncPoller?alt=com.azure.core.util.polling.SyncPoller&text=SyncPoller\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />,<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.core.util.polling.SyncPoller.cancelOperation()"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>.cancelOperation()"
name: "cancelOperation()"
nameWithType: "SyncPoller<T,U>.cancelOperation()"
summary: "Cancels the remote long-running operation if cancellation is supported by the service."
modifiers:
- "abstract"
syntax: "public abstract void cancelOperation()"
desc: "Cancels the remote long-running operation if cancellation is supported by the service.\n\nIf cancellation isn't supported by the service this will throw an exception."
- uid: "com.azure.core.util.polling.SyncPoller.getFinalResult()"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>.getFinalResult()"
name: "getFinalResult()"
nameWithType: "SyncPoller<T,U>.getFinalResult()"
summary: "Retrieve the final result of the long-running operation."
modifiers:
- "abstract"
syntax: "public abstract U getFinalResult()"
desc: "Retrieve the final result of the long-running operation.\n\nIf polling hasn't completed this will wait indefinitely until polling completes."
returns:
description: "the final result of the long-running operation if there is one."
type: "<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.util.polling.SyncPoller.getFinalResult(java.time.Duration)"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>.getFinalResult(Duration timeout)"
name: "getFinalResult(Duration timeout)"
nameWithType: "SyncPoller<T,U>.getFinalResult(Duration timeout)"
summary: "Retrieve the final result of the long-running operation."
modifiers:
- "default"
parameters:
- description: "the duration to wait for polling completion."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public default U getFinalResult(Duration timeout)"
desc: "Retrieve the final result of the long-running operation.\n\nIf polling hasn't completed this will wait for the `timeout` for polling to complete. In this case this API is effectively equivalent to <xref uid=\"com.azure.core.util.polling.SyncPoller.waitForCompletion(java.time.Duration)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#waitForCompletion(Duration)\"></xref> \\+ <xref uid=\"com.azure.core.util.polling.SyncPoller.getFinalResult()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getFinalResult()\"></xref>.\n\nPolling will continue until a completed <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref> is received or the timeout expires.\n\nThe `timeout` is applied in two ways, first it's used during each poll operation to time it out if the polling operation takes too long. Second, it's used to determine when the wait for should stop. If polling doesn't reach a completion state before the `timeout` elapses a <xref uid=\"java.lang.RuntimeException\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> wrapping a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TimeoutException\"></xref> will be thrown.\n\nIf this method isn't overridden by the implementation then this method is effectively equivalent to calling <xref uid=\"com.azure.core.util.polling.SyncPoller.waitForCompletion(java.time.Duration)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#waitForCompletion(Duration)\"></xref> then <xref uid=\"com.azure.core.util.polling.SyncPoller.getFinalResult()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getFinalResult()\"></xref>."
returns:
description: "the final result of the long-running operation if there is one."
type: "<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.util.polling.SyncPoller.poll()"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>.poll()"
name: "poll()"
nameWithType: "SyncPoller<T,U>.poll()"
summary: "Poll once and return the poll response received."
modifiers:
- "abstract"
syntax: "public abstract PollResponse<T> poll()"
desc: "Poll once and return the poll response received."
returns:
description: "the poll response"
type: "<xref href=\"com.azure.core.util.polling.PollResponse?alt=com.azure.core.util.polling.PollResponse&text=PollResponse\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.core.util.polling.SyncPoller.setPollInterval(java.time.Duration)"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>.setPollInterval(Duration pollInterval)"
name: "setPollInterval(Duration pollInterval)"
nameWithType: "SyncPoller<T,U>.setPollInterval(Duration pollInterval)"
summary: "Sets the poll interval for this poller."
modifiers:
- "default"
parameters:
- description: "The new poll interval for this poller."
name: "pollInterval"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public default SyncPoller<T,U> setPollInterval(Duration pollInterval)"
desc: "Sets the poll interval for this poller. The new interval will be used for all subsequent polling operations including the polling operations that are already in progress."
returns:
description: "The updated instance of <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref>."
type: "<xref href=\"com.azure.core.util.polling.SyncPoller?alt=com.azure.core.util.polling.SyncPoller&text=SyncPoller\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />,<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.core.util.polling.SyncPoller.waitForCompletion()"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>.waitForCompletion()"
name: "waitForCompletion()"
nameWithType: "SyncPoller<T,U>.waitForCompletion()"
summary: "Wait for polling to complete."
modifiers:
- "abstract"
syntax: "public abstract PollResponse<T> waitForCompletion()"
desc: "Wait for polling to complete. The polling is considered complete based on status defined in <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref>.\n\nThis operation will wait indefinitely until a completed <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref> is received."
returns:
description: "the final poll response"
type: "<xref href=\"com.azure.core.util.polling.PollResponse?alt=com.azure.core.util.polling.PollResponse&text=PollResponse\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.core.util.polling.SyncPoller.waitForCompletion(java.time.Duration)"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>.waitForCompletion(Duration timeout)"
name: "waitForCompletion(Duration timeout)"
nameWithType: "SyncPoller<T,U>.waitForCompletion(Duration timeout)"
summary: "Wait for polling to complete with a timeout."
modifiers:
- "abstract"
parameters:
- description: "the duration to wait for polling completion."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public abstract PollResponse<T> waitForCompletion(Duration timeout)"
desc: "Wait for polling to complete with a timeout. The polling is considered complete based on status defined in <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref> or if the timeout expires.\n\nPolling will continue until a completed <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref> is received or the timeout expires.\n\nThe `timeout` is applied in two ways, first it's used during each poll operation to time it out if the polling operation takes too long. Second, it's used to determine when the wait for should stop. If polling doesn't reach a completion state before the `timeout` elapses a <xref uid=\"java.lang.RuntimeException\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> wrapping a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TimeoutException\"></xref> will be thrown."
returns:
description: "the final poll response."
type: "<xref href=\"com.azure.core.util.polling.PollResponse?alt=com.azure.core.util.polling.PollResponse&text=PollResponse\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.core.util.polling.SyncPoller.waitUntil(com.azure.core.util.polling.LongRunningOperationStatus)"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>.waitUntil(LongRunningOperationStatus statusToWaitFor)"
name: "waitUntil(LongRunningOperationStatus statusToWaitFor)"
nameWithType: "SyncPoller<T,U>.waitUntil(LongRunningOperationStatus statusToWaitFor)"
summary: "Wait for the given <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref> to receive."
modifiers:
- "abstract"
parameters:
- description: "the desired <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref> to block for."
name: "statusToWaitFor"
type: "<xref href=\"com.azure.core.util.polling.LongRunningOperationStatus?alt=com.azure.core.util.polling.LongRunningOperationStatus&text=LongRunningOperationStatus\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract PollResponse<T> waitUntil(LongRunningOperationStatus statusToWaitFor)"
desc: "Wait for the given <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref> to receive.\n\nThis operation will wait indefinitely until the `statusToWaitFor` is received or a <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus.isComplete()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus#isComplete()\"></xref> state is reached."
returns:
description: "<xref uid=\"com.azure.core.util.polling.PollResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollResponse\"></xref> whose <xref uid=\"com.azure.core.util.polling.PollResponse.getStatus()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollResponse#getStatus()\"></xref> matches <code>statusToWaitFor</code> or is\n <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus.isComplete()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus#isComplete()\"></xref>."
type: "<xref href=\"com.azure.core.util.polling.PollResponse?alt=com.azure.core.util.polling.PollResponse&text=PollResponse\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.core.util.polling.SyncPoller.waitUntil(java.time.Duration,com.azure.core.util.polling.LongRunningOperationStatus)"
fullName: "com.azure.core.util.polling.SyncPoller<T,U>.waitUntil(Duration timeout, LongRunningOperationStatus statusToWaitFor)"
name: "waitUntil(Duration timeout, LongRunningOperationStatus statusToWaitFor)"
nameWithType: "SyncPoller<T,U>.waitUntil(Duration timeout, LongRunningOperationStatus statusToWaitFor)"
summary: "Wait for the given <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref> with a timeout."
modifiers:
- "abstract"
parameters:
- description: "the duration to wait for the polling."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "the desired <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref> to block for."
name: "statusToWaitFor"
type: "<xref href=\"com.azure.core.util.polling.LongRunningOperationStatus?alt=com.azure.core.util.polling.LongRunningOperationStatus&text=LongRunningOperationStatus\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract PollResponse<T> waitUntil(Duration timeout, LongRunningOperationStatus statusToWaitFor)"
desc: "Wait for the given <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref> with a timeout.\n\nPolling will continue until a response is returned with a <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus\"></xref> matching `statusToWaitFor`, a <xref uid=\"com.azure.core.util.polling.LongRunningOperationStatus.isComplete()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LongRunningOperationStatus#isComplete()\"></xref> state is reached, or the timeout expires.\n\nUnlike <xref uid=\"com.azure.core.util.polling.SyncPoller.waitForCompletion(java.time.Duration)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#waitForCompletion(Duration)\"></xref> or <xref uid=\"com.azure.core.util.polling.SyncPoller.getFinalResult(java.time.Duration)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getFinalResult(Duration)\"></xref>, when the timeout elapses a <xref uid=\"java.lang.RuntimeException\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> wrapping a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TimeoutException\"></xref> will not be thrown. Instead, the last poll response will be returned. This is because unlike a completion state, a wait for state may be skipped if the state is reached and completed before a poll operation is executed. For example, if a long-running operation has the flow `A -> B -> C -> D` and the `statusToWaitFor` is `B` and the first poll request returns state `A` but in the time between polls state `B` completes, then the next poll request will return state `C` and the `statusToWaitFor` will never be returned.\n\nThis may return null if no poll operation completes within the timeout."
returns:
description: "<xref uid=\"com.azure.core.util.polling.PollResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollResponse\"></xref> whose <xref uid=\"com.azure.core.util.polling.PollResponse.getStatus()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollResponse#getStatus()\"></xref> matches <code>statusToWaitFor</code>, or null if\n no response was returned within the timeout."
type: "<xref href=\"com.azure.core.util.polling.PollResponse?alt=com.azure.core.util.polling.PollResponse&text=PollResponse\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
type: "interface"
typeParameters:
- description: "The type of poll response value."
name: "T"
- description: "The type of the final result of long-running operation."
name: "U"
desc: "A type that offers API that simplifies the task of executing long-running operations against an Azure service.\n\nIt provides the following functionality:\n\n * Querying the current state of the long-running operation.\n * Requesting cancellation of long-running operation, if supported by the service.\n * Fetching final result of long-running operation, if supported by the service.\n * Wait for long-running operation to complete, with optional timeout.\n * Wait for long-running operation to reach a specific state."
metadata: {}
package: "com.azure.core.util.polling"
artifact: com.azure:azure-core:1.49.1