-
Notifications
You must be signed in to change notification settings - Fork 224
/
com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.yml
131 lines (131 loc) · 15.1 KB
/
com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.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
### YamlMime:JavaType
uid: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor"
fullName: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor"
name: "DocumentBulkExecutor"
nameWithType: "DocumentBulkExecutor"
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 class **DocumentBulkExecutor**</br> implements <xref href=\"java.lang.AutoCloseable?alt=java.lang.AutoCloseable&text=AutoCloseable\" data-throw-if-not-resolved=\"False\" />"
methods:
- uid: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.builder()"
fullName: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.builder()"
name: "builder()"
nameWithType: "DocumentBulkExecutor.builder()"
summary: "Creates a new <xref uid=\"com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.Builder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"DocumentBulkExecutor.Builder\"></xref> instance"
modifiers:
- "static"
syntax: "public static DocumentBulkExecutor.Builder builder()"
desc: "Creates a new <xref uid=\"com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.Builder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"DocumentBulkExecutor.Builder\"></xref> instance"
returns:
description: "an instance of <xref uid=\"com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.Builder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"DocumentBulkExecutor.Builder\"></xref>"
type: "<xref href=\"com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.Builder?alt=com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.Builder&text=Builder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.close()"
fullName: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.close()"
name: "close()"
nameWithType: "DocumentBulkExecutor.close()"
summary: "Releases any internal resources."
syntax: "public void close()"
desc: "Releases any internal resources. It is responsibility of the caller to close <xref uid=\"com.microsoft.azure.documentdb.DocumentClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"DocumentClient\"></xref>."
- uid: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.deleteAll(java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String>>)"
fullName: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.deleteAll(List<Pair<String,String>> pkIdPairsToDelete)"
name: "deleteAll(List<Pair<String,String>> pkIdPairsToDelete)"
nameWithType: "DocumentBulkExecutor.deleteAll(List<Pair<String,String>> pkIdPairsToDelete)"
summary: "Executes a bulk delete in the Azure Cosmos DB database service."
parameters:
- description: "List of pairs of partition key and id values of documents to delete"
name: "pkIdPairsToDelete"
type: "<xref href=\"java.util.List?alt=java.util.List&text=List\" data-throw-if-not-resolved=\"False\" /><<xref href=\"org.apache.commons.lang3.tuple.Pair?alt=org.apache.commons.lang3.tuple.Pair&text=Pair\" data-throw-if-not-resolved=\"False\" /><<xref href=\"java.lang.String?alt=java.lang.String&text=String\" 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 BulkDeleteResponse deleteAll(List<Pair<String,String>> pkIdPairsToDelete)"
exceptions:
- description: "if any failure happens"
type: "<xref href=\"com.microsoft.azure.documentdb.DocumentClientException?alt=com.microsoft.azure.documentdb.DocumentClientException&text=DocumentClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Executes a bulk delete in the Azure Cosmos DB database service."
returns:
description: "an instance of <xref uid=\"com.microsoft.azure.documentdb.bulkexecutor.BulkDeleteResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BulkDeleteResponse\"></xref>"
type: "<xref href=\"com.microsoft.azure.documentdb.bulkexecutor.BulkDeleteResponse?alt=com.microsoft.azure.documentdb.bulkexecutor.BulkDeleteResponse&text=BulkDeleteResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.importAll(java.util.Collection<java.lang.String>,boolean,boolean,java.lang.Integer)"
fullName: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.importAll(Collection<String> documents, boolean isUpsert, boolean disableAutomaticIdGeneration, Integer maxConcurrencyPerPartitionRange)"
name: "importAll(Collection<String> documents, boolean isUpsert, boolean disableAutomaticIdGeneration, Integer maxConcurrencyPerPartitionRange)"
nameWithType: "DocumentBulkExecutor.importAll(Collection<String> documents, boolean isUpsert, boolean disableAutomaticIdGeneration, Integer maxConcurrencyPerPartitionRange)"
summary: "Executes a bulk import in the Azure Cosmos DB database service."
parameters:
- description: "specifies the collection of JSON-serialized documents to import"
name: "documents"
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\" />>"
- description: "indicates whether a document in the supplied collection needs to be overwritten if the id already exists"
name: "isUpsert"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- description: "indicates whether the id has to be automatically generated for a document if absent in the supplied collection"
name: "disableAutomaticIdGeneration"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- description: "specifies the maximum degree of concurrency per partition key range (default value is 20 if set to null)"
name: "maxConcurrencyPerPartitionRange"
type: "<xref href=\"java.lang.Integer?alt=java.lang.Integer&text=Integer\" data-throw-if-not-resolved=\"False\" />"
syntax: "public BulkImportResponse importAll(Collection<String> documents, boolean isUpsert, boolean disableAutomaticIdGeneration, Integer maxConcurrencyPerPartitionRange)"
exceptions:
- description: "if any failure happens"
type: "<xref href=\"com.microsoft.azure.documentdb.DocumentClientException?alt=com.microsoft.azure.documentdb.DocumentClientException&text=DocumentClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Executes a bulk import in the Azure Cosmos DB database service.\n\n> ```\n> ConnectionPolicy connectionPolicy = new ConnectionPolicy();\n> RetryOptions retryOptions = new RetryOptions();\n> \n> // Set client's retry options high for initialization\n> retryOptions.setMaxRetryWaitTimeInSeconds(120);\n> retryOptions.setMaxRetryAttemptsOnThrottledRequests(100);\n> connectionPolicy.setRetryOptions(retryOptions);\n> connectionPolicy.setMaxPoolSize(1000);\n> \n> DocumentClient client = new DocumentClient(HOST, MASTER_KEY, connectionPolicy, null);\n> \n> String collectionLink = String.format(\"/dbs/%s/colls/%s\", \"mydb\", \"mycol\");\n> DocumentCollection collection = client.readCollection(collectionLink, null).getResource();\n> \n> DocumentBulkExecutor executor = DocumentBulkExecutor.builder().from(client, collection,\n> collection.getPartitionKey(), collectionOfferThroughput).build();\n> \n> // Set retries to 0 to pass control to bulk executor\n> client.getConnectionPolicy().getRetryOptions().setMaxRetryWaitTimeInSeconds(0);\n> client.getConnectionPolicy().getRetryOptions().setMaxRetryAttemptsOnThrottledRequests(0);\n> \n> for(int i = 0; i < 10; i++) {\n> List documents = documentSource.getMoreDocuments();\n> \n> BulkImportResponse bulkImportResponse = executor.importAll(documents, false, true, 40);\n> \n> // Validate that all documents inserted to ensure no failure.\n> if (bulkImportResponse.getNumberOfDocumentsImported() < documents.size()) {\n> for(Exception e: bulkImportResponse.getErrors()) {\n> // Validate why there were some failures.\n> e.printStackTrace();\n> }\n> break;\n> }\n> }\n> \n> executor.close();\n> client.close();\n> ```"
returns:
description: "an instance of <xref uid=\"com.microsoft.azure.documentdb.bulkexecutor.BulkImportResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BulkImportResponse\"></xref>"
type: "<xref href=\"com.microsoft.azure.documentdb.bulkexecutor.BulkImportResponse?alt=com.microsoft.azure.documentdb.bulkexecutor.BulkImportResponse&text=BulkImportResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.mergeAll(java.util.Collection<com.microsoft.azure.documentdb.Document>,java.lang.Integer)"
fullName: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.mergeAll(Collection<Document> patchDocuments, Integer maxConcurrencyPerPartitionRange)"
name: "mergeAll(Collection<Document> patchDocuments, Integer maxConcurrencyPerPartitionRange)"
nameWithType: "DocumentBulkExecutor.mergeAll(Collection<Document> patchDocuments, Integer maxConcurrencyPerPartitionRange)"
summary: "Executes a bulk update in the Azure Cosmos DB database service with given set of patch documents."
parameters:
- description: "which are documents comprising id, partition key values and fields to set with the corresponding values"
name: "patchDocuments"
type: "<xref href=\"java.util.Collection?alt=java.util.Collection&text=Collection\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.microsoft.azure.documentdb.Document?alt=com.microsoft.azure.documentdb.Document&text=Document\" data-throw-if-not-resolved=\"False\" />>"
- description: "specifies the maximum degree of concurrency per partition key range (default value is 20 if set to null)"
name: "maxConcurrencyPerPartitionRange"
type: "<xref href=\"java.lang.Integer?alt=java.lang.Integer&text=Integer\" data-throw-if-not-resolved=\"False\" />"
syntax: "public BulkUpdateResponse mergeAll(Collection<Document> patchDocuments, Integer maxConcurrencyPerPartitionRange)"
exceptions:
- description: "if any failure happens"
type: "<xref href=\"com.microsoft.azure.documentdb.DocumentClientException?alt=com.microsoft.azure.documentdb.DocumentClientException&text=DocumentClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Executes a bulk update in the Azure Cosmos DB database service with given set of patch documents."
returns:
description: "an instance of <xref uid=\"com.microsoft.azure.documentdb.bulkexecutor.BulkUpdateResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BulkUpdateResponse\"></xref>"
type: "<xref href=\"com.microsoft.azure.documentdb.bulkexecutor.BulkUpdateResponse?alt=com.microsoft.azure.documentdb.bulkexecutor.BulkUpdateResponse&text=BulkUpdateResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.updateAll(java.util.Collection<com.microsoft.azure.documentdb.bulkexecutor.UpdateItem>,java.lang.Integer)"
fullName: "com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor.updateAll(Collection<UpdateItem> updateItems, Integer maxConcurrencyPerPartitionRange)"
name: "updateAll(Collection<UpdateItem> updateItems, Integer maxConcurrencyPerPartitionRange)"
nameWithType: "DocumentBulkExecutor.updateAll(Collection<UpdateItem> updateItems, Integer maxConcurrencyPerPartitionRange)"
summary: "Executes a bulk update in the Azure Cosmos DB database service."
parameters:
- description: "specifies the collection of update items each of which comprises the list of field update operations to be performed\n on a document identified by an id and partition key value."
name: "updateItems"
type: "<xref href=\"java.util.Collection?alt=java.util.Collection&text=Collection\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.microsoft.azure.documentdb.bulkexecutor.UpdateItem?alt=com.microsoft.azure.documentdb.bulkexecutor.UpdateItem&text=UpdateItem\" data-throw-if-not-resolved=\"False\" />>"
- description: "specifies the maximum degree of concurrency per partition key range (default value is 20 if set to null)"
name: "maxConcurrencyPerPartitionRange"
type: "<xref href=\"java.lang.Integer?alt=java.lang.Integer&text=Integer\" data-throw-if-not-resolved=\"False\" />"
syntax: "public BulkUpdateResponse updateAll(Collection<UpdateItem> updateItems, Integer maxConcurrencyPerPartitionRange)"
exceptions:
- description: "if any failure happens"
type: "<xref href=\"com.microsoft.azure.documentdb.DocumentClientException?alt=com.microsoft.azure.documentdb.DocumentClientException&text=DocumentClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Executes a bulk update in the Azure Cosmos DB database service."
returns:
description: "an instance of <xref uid=\"com.microsoft.azure.documentdb.bulkexecutor.BulkUpdateResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BulkUpdateResponse\"></xref>"
type: "<xref href=\"com.microsoft.azure.documentdb.bulkexecutor.BulkUpdateResponse?alt=com.microsoft.azure.documentdb.bulkexecutor.BulkUpdateResponse&text=BulkUpdateResponse\" data-throw-if-not-resolved=\"False\" />"
type: "class"
implements:
- "<xref href=\"java.lang.AutoCloseable?alt=java.lang.AutoCloseable&text=AutoCloseable\" data-throw-if-not-resolved=\"False\" />"
metadata: {}
package: "com.microsoft.azure.documentdb.bulkexecutor"
artifact: com.microsoft.azure:documentdb-bulkexecutor:2.9.3