-
Notifications
You must be signed in to change notification settings - Fork 224
/
com.microsoft.azure.documentdb.ConnectionPolicy.yml
372 lines (372 loc) · 29.8 KB
/
com.microsoft.azure.documentdb.ConnectionPolicy.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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
### YamlMime:JavaType
uid: "com.microsoft.azure.documentdb.ConnectionPolicy"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy"
name: "ConnectionPolicy"
nameWithType: "ConnectionPolicy"
summary: "Represents the Connection policy associated with a Document<wbr>Client in the Azure Cosmos DB database service."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "<xref href=\"java.lang.Object?alt=java.lang.Object&text=Object\" data-throw-if-not-resolved=\"False\" />"
methodsRef:
- "<xref href=\"java.lang.Object.clone()?alt=java.lang.Object.clone&text=clone\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.equals(java.lang.Object)?alt=java.lang.Object.equals&text=equals\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.finalize()?alt=java.lang.Object.finalize&text=finalize\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.getClass()?alt=java.lang.Object.getClass&text=getClass\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.hashCode()?alt=java.lang.Object.hashCode&text=hashCode\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.notify()?alt=java.lang.Object.notify&text=notify\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.notifyAll()?alt=java.lang.Object.notifyAll&text=notifyAll\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.toString()?alt=java.lang.Object.toString&text=toString\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait()?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait(long)?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait(long,int)?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
syntax: "public final class **ConnectionPolicy**"
constructors:
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.ConnectionPolicy()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.ConnectionPolicy()"
name: "ConnectionPolicy()"
nameWithType: "ConnectionPolicy.ConnectionPolicy()"
summary: "Constructor."
syntax: "public ConnectionPolicy()"
desc: "Constructor."
methods:
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.GetDefault()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.GetDefault()"
name: "GetDefault()"
nameWithType: "ConnectionPolicy.GetDefault()"
summary: "Gets the default connection policy."
modifiers:
- "static"
syntax: "public static ConnectionPolicy GetDefault()"
desc: "Gets the default connection policy."
returns:
description: "the default connection policy."
type: "<xref href=\"com.microsoft.azure.documentdb.ConnectionPolicy?alt=com.microsoft.azure.documentdb.ConnectionPolicy&text=ConnectionPolicy\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getConnectionMode()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getConnectionMode()"
name: "getConnectionMode()"
nameWithType: "ConnectionPolicy.getConnectionMode()"
summary: "Gets the connection mode used in the client."
syntax: "public ConnectionMode getConnectionMode()"
desc: "Gets the connection mode used in the client."
returns:
description: "the connection mode."
type: "<xref href=\"com.microsoft.azure.documentdb.ConnectionMode?alt=com.microsoft.azure.documentdb.ConnectionMode&text=ConnectionMode\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getDirectRequestTimeout()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getDirectRequestTimeout()"
name: "getDirectRequestTimeout()"
nameWithType: "ConnectionPolicy.getDirectRequestTimeout()"
summary: "Gets the direct mode request timeout (time to wait for response from network peer) in seconds This only applies to requests that talk directly to the backend."
syntax: "public int getDirectRequestTimeout()"
desc: "Gets the direct mode request timeout (time to wait for response from network peer) in seconds This only applies to requests that talk directly to the backend. Use <xref uid=\"com.microsoft.azure.documentdb.ConnectionPolicy.getRequestTimeout*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ConnectionPolicy#getRequestTimeout\"></xref> for requests that go through gateway."
returns:
description: "the direct request timeout in seconds."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getEnableEndpointDiscovery()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getEnableEndpointDiscovery()"
name: "getEnableEndpointDiscovery()"
nameWithType: "ConnectionPolicy.getEnableEndpointDiscovery()"
summary: "Gets the flag to enable endpoint discovery for geo-replicated database accounts."
syntax: "public boolean getEnableEndpointDiscovery()"
desc: "Gets the flag to enable endpoint discovery for geo-replicated database accounts."
returns:
description: "whether endpoint discovery is enabled."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getHandleServiceUnavailableFromProxy()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getHandleServiceUnavailableFromProxy()"
name: "getHandleServiceUnavailableFromProxy()"
nameWithType: "ConnectionPolicy.getHandleServiceUnavailableFromProxy()"
summary: "Gets the flag to handle service unavailable errors returned without a service version header, by a proxy."
syntax: "public boolean getHandleServiceUnavailableFromProxy()"
desc: "Gets the flag to handle service unavailable errors returned without a service version header, by a proxy. When the value of this property is true, the SDK will handle it as a known error and perform retries. Default value is false as this is an opt in feature."
returns:
description: "flag to handle service unavailable errors returned without a service version header, by a proxy."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getIdleConnectionTimeout()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getIdleConnectionTimeout()"
name: "getIdleConnectionTimeout()"
nameWithType: "ConnectionPolicy.getIdleConnectionTimeout()"
summary: "Gets the value of the timeout for an idle connection, the default is 60 seconds."
syntax: "public int getIdleConnectionTimeout()"
desc: "Gets the value of the timeout for an idle connection, the default is 60 seconds."
returns:
description: "Idle connection timeout."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getMaxPoolSize()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getMaxPoolSize()"
name: "getMaxPoolSize()"
nameWithType: "ConnectionPolicy.getMaxPoolSize()"
summary: "Gets the value of the connection pool size the client is using."
syntax: "public int getMaxPoolSize()"
desc: "Gets the value of the connection pool size the client is using."
returns:
description: "connection pool size."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getMaxRetryOnThrottledAttempts()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getMaxRetryOnThrottledAttempts()"
name: "getMaxRetryOnThrottledAttempts()"
nameWithType: "ConnectionPolicy.getMaxRetryOnThrottledAttempts()"
summary: "Gets the maximum number of retries in the case where the request fails due to a throttle error."
syntax: "</br>public Integer getMaxRetryOnThrottledAttempts()"
desc: "Gets the maximum number of retries in the case where the request fails due to a throttle error.\n\nThis property is deprecated. Please use connectionPolicy.getRetryOptions().getMaxRetryAttemptsOnThrottledRequests() for equivalent functionality."
returns:
description: "maximum number of retry attempts."
type: "<xref href=\"java.lang.Integer?alt=java.lang.Integer&text=Integer\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getMediaReadMode()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getMediaReadMode()"
name: "getMediaReadMode()"
nameWithType: "ConnectionPolicy.getMediaReadMode()"
summary: "Gets the attachment content (aka media) download mode."
syntax: "public MediaReadMode getMediaReadMode()"
desc: "Gets the attachment content (aka media) download mode."
returns:
description: "the media read mode."
type: "<xref href=\"com.microsoft.azure.documentdb.MediaReadMode?alt=com.microsoft.azure.documentdb.MediaReadMode&text=MediaReadMode\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getMediaRequestTimeout()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getMediaRequestTimeout()"
name: "getMediaRequestTimeout()"
nameWithType: "ConnectionPolicy.getMediaRequestTimeout()"
summary: "Gets or sets Time to wait for response from network peer for attachment content (aka media) operations."
syntax: "public int getMediaRequestTimeout()"
desc: "Gets or sets Time to wait for response from network peer for attachment content (aka media) operations."
returns:
description: "the media request timeout in seconds."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getPreferredLocations()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getPreferredLocations()"
name: "getPreferredLocations()"
nameWithType: "ConnectionPolicy.getPreferredLocations()"
summary: "Gets the preferred locations for geo-replicated database accounts"
syntax: "public Collection<String> getPreferredLocations()"
desc: "Gets the preferred locations for geo-replicated database accounts"
returns:
description: "the list of preferred location."
type: "<xref href=\"java.util.Collection?alt=java.util.Collection&text=Collection\" data-throw-if-not-resolved=\"False\" /><<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getProxy()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getProxy()"
name: "getProxy()"
nameWithType: "ConnectionPolicy.getProxy()"
summary: "Gets a proxy which will be used when making a request."
syntax: "public HttpHost getProxy()"
desc: "Gets a proxy which will be used when making a request. Default is `null`."
returns:
description: "A proxy to use when making a request."
type: "<xref href=\"org.apache.http.HttpHost?alt=org.apache.http.HttpHost&text=HttpHost\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getRequestTimeout()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getRequestTimeout()"
name: "getRequestTimeout()"
nameWithType: "ConnectionPolicy.getRequestTimeout()"
summary: "Gets the request timeout (time to wait for response from network peer) in seconds."
syntax: "public int getRequestTimeout()"
desc: "Gets the request timeout (time to wait for response from network peer) in seconds."
returns:
description: "the request timeout in seconds."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getRetryOptions()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getRetryOptions()"
name: "getRetryOptions()"
nameWithType: "ConnectionPolicy.getRetryOptions()"
summary: "Gets the retry policy options associated with the Document<wbr>Client instance."
syntax: "public RetryOptions getRetryOptions()"
desc: "Gets the retry policy options associated with the DocumentClient instance."
returns:
description: "the RetryOptions instance."
type: "<xref href=\"com.microsoft.azure.documentdb.RetryOptions?alt=com.microsoft.azure.documentdb.RetryOptions&text=RetryOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.getUserAgentSuffix()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.getUserAgentSuffix()"
name: "getUserAgentSuffix()"
nameWithType: "ConnectionPolicy.getUserAgentSuffix()"
summary: "Gets the value of user-agent suffix."
syntax: "public String getUserAgentSuffix()"
desc: "Gets the value of user-agent suffix."
returns:
description: "the value of user-agent suffix."
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.isUsingMultipleWriteLocations()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.isUsingMultipleWriteLocations()"
name: "isUsingMultipleWriteLocations()"
nameWithType: "ConnectionPolicy.isUsingMultipleWriteLocations()"
summary: "Gets the flag to enable writes on any locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service."
syntax: "public boolean isUsingMultipleWriteLocations()"
desc: "Gets the flag to enable writes on any locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. When the value of this property is true, the SDK will direct write operations to available writable locations of geo-replicated database account. Writable locations are ordered by PreferredLocations property. Setting the property value to true has no effect until EnableMultipleWriteLocations in DatabaseAccount is also set to true. Default value is false indicating that writes are only directed to first region in PreferredLocations property."
returns:
description: "flag to enable writes on any locations (regions) for geo-replicated database accounts."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setConnectionMode(com.microsoft.azure.documentdb.ConnectionMode)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setConnectionMode(ConnectionMode connectionMode)"
name: "setConnectionMode(ConnectionMode connectionMode)"
nameWithType: "ConnectionPolicy.setConnectionMode(ConnectionMode connectionMode)"
summary: "Sets the connection mode used in the client."
parameters:
- description: "the connection mode."
name: "connectionMode"
type: "<xref href=\"com.microsoft.azure.documentdb.ConnectionMode?alt=com.microsoft.azure.documentdb.ConnectionMode&text=ConnectionMode\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setConnectionMode(ConnectionMode connectionMode)"
desc: "Sets the connection mode used in the client."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setDirectRequestTimeout(int)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setDirectRequestTimeout(int directRequestTimeout)"
name: "setDirectRequestTimeout(int directRequestTimeout)"
nameWithType: "ConnectionPolicy.setDirectRequestTimeout(int directRequestTimeout)"
summary: "Sets the direct mode request timeout (time to wait for response from network peer) in seconds This only applies to requests that talk directly to the backend."
parameters:
- description: "the direct request timeout in seconds."
name: "directRequestTimeout"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setDirectRequestTimeout(int directRequestTimeout)"
desc: "Sets the direct mode request timeout (time to wait for response from network peer) in seconds This only applies to requests that talk directly to the backend. Use <xref uid=\"com.microsoft.azure.documentdb.ConnectionPolicy.setRequestTimeout*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ConnectionPolicy#setRequestTimeout\"></xref> for requests that go through gateway."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setEnableEndpointDiscovery(boolean)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setEnableEndpointDiscovery(boolean enableEndpointDiscovery)"
name: "setEnableEndpointDiscovery(boolean enableEndpointDiscovery)"
nameWithType: "ConnectionPolicy.setEnableEndpointDiscovery(boolean enableEndpointDiscovery)"
summary: "Sets the flag to enable endpoint discovery for geo-replicated database accounts."
parameters:
- description: "true if EndpointDiscovery is enabled."
name: "enableEndpointDiscovery"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setEnableEndpointDiscovery(boolean enableEndpointDiscovery)"
desc: "Sets the flag to enable endpoint discovery for geo-replicated database accounts.\n\nWhen EnableEndpointDiscovery is true, the SDK will automatically discover the current write and read regions to ensure requests are sent to the correct region based on the capability of the region and the user's preference.\n\nThe default value for this property is true indicating endpoint discovery is enabled."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setHandleServiceUnavailableFromProxy(boolean)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setHandleServiceUnavailableFromProxy(boolean handleServiceUnavailableFromProxy)"
name: "setHandleServiceUnavailableFromProxy(boolean handleServiceUnavailableFromProxy)"
nameWithType: "ConnectionPolicy.setHandleServiceUnavailableFromProxy(boolean handleServiceUnavailableFromProxy)"
summary: "Sets the flag to handle service unavailable errors returned without a service version header, by a proxy."
parameters:
- description: "flag to handle service unavailable errors returned \n without a service version header, by a proxy."
name: "handleServiceUnavailableFromProxy"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setHandleServiceUnavailableFromProxy(boolean handleServiceUnavailableFromProxy)"
desc: "Sets the flag to handle service unavailable errors returned without a service version header, by a proxy. When the value of this property is true, the SDK will handle it as a known error and perform retries. Default value is false as this is an opt in feature."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setIdleConnectionTimeout(int)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setIdleConnectionTimeout(int idleConnectionTimeout)"
name: "setIdleConnectionTimeout(int idleConnectionTimeout)"
nameWithType: "ConnectionPolicy.setIdleConnectionTimeout(int idleConnectionTimeout)"
summary: "sets the value of the timeout for an idle connection."
parameters:
- description: "the timeout for an idle connection in seconds."
name: "idleConnectionTimeout"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setIdleConnectionTimeout(int idleConnectionTimeout)"
desc: "sets the value of the timeout for an idle connection. After that time, the connection will be automatically closed."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setMaxPoolSize(int)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setMaxPoolSize(int maxPoolSize)"
name: "setMaxPoolSize(int maxPoolSize)"
nameWithType: "ConnectionPolicy.setMaxPoolSize(int maxPoolSize)"
summary: "Sets the value of the connection pool size of the httpclient, the default is 100."
parameters:
- description: "The value of the connection pool size the httpclient is using."
name: "maxPoolSize"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setMaxPoolSize(int maxPoolSize)"
desc: "Sets the value of the connection pool size of the httpclient, the default is 100."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setMaxRetryOnThrottledAttempts(java.lang.Integer)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setMaxRetryOnThrottledAttempts(Integer maxRetryOnThrottledAttempts)"
name: "setMaxRetryOnThrottledAttempts(Integer maxRetryOnThrottledAttempts)"
nameWithType: "ConnectionPolicy.setMaxRetryOnThrottledAttempts(Integer maxRetryOnThrottledAttempts)"
summary: "Sets the maximum number of retries in the case where the request fails due to a throttle error."
parameters:
- description: "the max number of retry attempts on failed requests."
name: "maxRetryOnThrottledAttempts"
type: "<xref href=\"java.lang.Integer?alt=java.lang.Integer&text=Integer\" data-throw-if-not-resolved=\"False\" />"
syntax: "</br>public void setMaxRetryOnThrottledAttempts(Integer maxRetryOnThrottledAttempts)"
desc: "Sets the maximum number of retries in the case where the request fails due to a throttle error.\n\nWhen a client is sending request faster than the request rate limit imposed by the service, the service will return HttpStatusCode 429 (Too Many Request) to throttle the client. The current implementation in the SDK will then wait for the amount of time the service tells it to wait and retry after the time has elapsed.\n\nThe default value is 9. This means in the case where the request is throttled, the same request will be issued for a maximum of 10 times to the server before an error is returned to the application.\n\nThis property is deprecated. Please use connectionPolicy.getRetryOptions().setMaxRetryAttemptsOnThrottledRequests() for equivalent functionality."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setMediaReadMode(com.microsoft.azure.documentdb.MediaReadMode)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setMediaReadMode(MediaReadMode mediaReadMode)"
name: "setMediaReadMode(MediaReadMode mediaReadMode)"
nameWithType: "ConnectionPolicy.setMediaReadMode(MediaReadMode mediaReadMode)"
summary: "Sets the attachment content (aka media) download mode."
parameters:
- description: "the media read mode."
name: "mediaReadMode"
type: "<xref href=\"com.microsoft.azure.documentdb.MediaReadMode?alt=com.microsoft.azure.documentdb.MediaReadMode&text=MediaReadMode\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setMediaReadMode(MediaReadMode mediaReadMode)"
desc: "Sets the attachment content (aka media) download mode."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setMediaRequestTimeout(int)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setMediaRequestTimeout(int mediaRequestTimeout)"
name: "setMediaRequestTimeout(int mediaRequestTimeout)"
nameWithType: "ConnectionPolicy.setMediaRequestTimeout(int mediaRequestTimeout)"
summary: "Gets or sets Time to wait for response from network peer for attachment content (aka media) operations."
parameters:
- description: "the media request timeout in seconds."
name: "mediaRequestTimeout"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setMediaRequestTimeout(int mediaRequestTimeout)"
desc: "Gets or sets Time to wait for response from network peer for attachment content (aka media) operations."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setPreferredLocations(java.util.Collection<java.lang.String>)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setPreferredLocations(Collection<String> preferredLocations)"
name: "setPreferredLocations(Collection<String> preferredLocations)"
nameWithType: "ConnectionPolicy.setPreferredLocations(Collection<String> preferredLocations)"
summary: "Sets the preferred locations for geo-replicated database accounts."
parameters:
- description: "the list of preferred locations."
name: "preferredLocations"
type: "<xref href=\"java.util.Collection?alt=java.util.Collection&text=Collection\" data-throw-if-not-resolved=\"False\" /><<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />>"
syntax: "public void setPreferredLocations(Collection<String> preferredLocations)"
desc: "Sets the preferred locations for geo-replicated database accounts. For example, \"East US\" as the preferred location.\n\nWhen EnableEndpointDiscovery is true and PreferredRegions is non-empty, the SDK will prefer to use the locations in the collection in the order they are specified to perform operations.\n\nIf EnableEndpointDiscovery is set to false, this property is ignored."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setProxy(org.apache.http.HttpHost)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setProxy(HttpHost proxy)"
name: "setProxy(HttpHost proxy)"
nameWithType: "ConnectionPolicy.setProxy(HttpHost proxy)"
summary: "Sets a proxy which will be used when making a request."
parameters:
- description: "A proxy to use when making a request."
name: "proxy"
type: "<xref href=\"org.apache.http.HttpHost?alt=org.apache.http.HttpHost&text=HttpHost\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setProxy(HttpHost proxy)"
desc: "Sets a proxy which will be used when making a request. Default is `null`."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setRequestTimeout(int)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setRequestTimeout(int requestTimeout)"
name: "setRequestTimeout(int requestTimeout)"
nameWithType: "ConnectionPolicy.setRequestTimeout(int requestTimeout)"
summary: "Sets the request timeout (time to wait for response from network peer) in seconds."
parameters:
- description: "the request timeout in seconds."
name: "requestTimeout"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setRequestTimeout(int requestTimeout)"
desc: "Sets the request timeout (time to wait for response from network peer) in seconds."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setRetryOptions(com.microsoft.azure.documentdb.RetryOptions)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setRetryOptions(RetryOptions retryOptions)"
name: "setRetryOptions(RetryOptions retryOptions)"
nameWithType: "ConnectionPolicy.setRetryOptions(RetryOptions retryOptions)"
summary: "Sets the retry policy options associated with the Document<wbr>Client instance."
parameters:
- description: "the RetryOptions instance."
name: "retryOptions"
type: "<xref href=\"com.microsoft.azure.documentdb.RetryOptions?alt=com.microsoft.azure.documentdb.RetryOptions&text=RetryOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setRetryOptions(RetryOptions retryOptions)"
desc: "Sets the retry policy options associated with the DocumentClient instance.\n\nProperties in the RetryOptions class allow application to customize the built-in retry policies. This property is optional. When it's not set, the SDK uses the default values for configuring the retry policies. See RetryOptions class for more details."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setUserAgentSuffix(java.lang.String)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setUserAgentSuffix(String userAgentSuffix)"
name: "setUserAgentSuffix(String userAgentSuffix)"
nameWithType: "ConnectionPolicy.setUserAgentSuffix(String userAgentSuffix)"
summary: "sets the value of the user-agent suffix."
parameters:
- description: "The value to be appended to the user-agent header, this is\n used for monitoring purposes."
name: "userAgentSuffix"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setUserAgentSuffix(String userAgentSuffix)"
desc: "sets the value of the user-agent suffix."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.setUsingMultipleWriteLocations(boolean)"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.setUsingMultipleWriteLocations(boolean usingMultipleWriteLocations)"
name: "setUsingMultipleWriteLocations(boolean usingMultipleWriteLocations)"
nameWithType: "ConnectionPolicy.setUsingMultipleWriteLocations(boolean usingMultipleWriteLocations)"
summary: "Sets the flag to enable writes on any locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service."
parameters:
- description: "flag to enable writes on any locations (regions) for geo-replicated database accounts."
name: "usingMultipleWriteLocations"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setUsingMultipleWriteLocations(boolean usingMultipleWriteLocations)"
desc: "Sets the flag to enable writes on any locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. When the value of this property is true, the SDK will direct write operations to available writable locations of geo-replicated database account. Writable locations are ordered by PreferredLocations property. Setting the property value to true has no effect until EnableMultipleWriteLocations in DatabaseAccount is also set to true. Default value is false indicating that writes are only directed to first region in PreferredLocations property."
- uid: "com.microsoft.azure.documentdb.ConnectionPolicy.toString()"
fullName: "com.microsoft.azure.documentdb.ConnectionPolicy.toString()"
name: "toString()"
nameWithType: "ConnectionPolicy.toString()"
overridden: "java.lang.Object.toString()"
syntax: "public String toString()"
returns:
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "Represents the Connection policy associated with a DocumentClient in the Azure Cosmos DB database service."
metadata: {}
package: "com.microsoft.azure.documentdb"
artifact: com.microsoft.azure:azure-documentdb:2.4.7