public class CosmosAsyncContainer extends Object
Modifier and Type | Method and Description |
---|---|
<T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> |
createItem(T item)
Creates a cosmos item.
|
<T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> |
createItem(T item,
CosmosItemRequestOptions options) |
<T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> |
createItem(T item,
PartitionKey partitionKey,
CosmosItemRequestOptions options)
Creates a cosmos item.
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
delete()
Deletes the item container
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
delete(CosmosContainerRequestOptions options)
Deletes the item container
|
reactor.core.publisher.Mono<CosmosAsyncItemResponse> |
deleteItem(String itemId,
PartitionKey partitionKey)
Deletes the item.
|
reactor.core.publisher.Mono<CosmosAsyncItemResponse> |
deleteItem(String itemId,
PartitionKey partitionKey,
CosmosItemRequestOptions options)
Deletes the item.
|
CosmosAsyncConflict |
getConflict(String id)
Gets a CosmosAsyncConflict object without making a service call
|
CosmosAsyncDatabase |
getDatabase()
Gets the parent Database
|
String |
getId()
Get the id of the
CosmosAsyncContainer |
CosmosAsyncScripts |
getScripts() |
CosmosContinuablePagedFlux<CosmosConflictProperties> |
queryConflicts(String query)
Queries all the conflicts in the container
|
CosmosContinuablePagedFlux<CosmosConflictProperties> |
queryConflicts(String query,
FeedOptions options)
Queries all the conflicts in the container
|
<T> CosmosContinuablePagedFlux<T> |
queryItems(SqlQuerySpec querySpec,
Class<T> klass)
Query for documents in a items in a container
|
<T> CosmosContinuablePagedFlux<T> |
queryItems(SqlQuerySpec querySpec,
FeedOptions options,
Class<T> klass)
Query for documents in a items in a container
|
<T> CosmosContinuablePagedFlux<T> |
queryItems(String query,
Class<T> klass)
Query for documents in a items in a container
|
<T> CosmosContinuablePagedFlux<T> |
queryItems(String query,
FeedOptions options,
Class<T> klass)
Query for documents in a items in a container
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
read()
Reads the document container
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
read(CosmosContainerRequestOptions options)
Reads the document container by the container link.
|
CosmosContinuablePagedFlux<CosmosConflictProperties> |
readAllConflicts(FeedOptions options)
Lists all the conflicts in the container
|
<T> CosmosContinuablePagedFlux<T> |
readAllItems(Class<T> klass)
Reads all cosmos items in the container.
|
<T> CosmosContinuablePagedFlux<T> |
readAllItems(FeedOptions options,
Class<T> klass)
Reads all cosmos items in a container.
|
<T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> |
readItem(String itemId,
PartitionKey partitionKey,
Class<T> itemType)
Reads an item.
|
<T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> |
readItem(String itemId,
PartitionKey partitionKey,
CosmosItemRequestOptions options,
Class<T> itemType)
Reads an item.
|
reactor.core.publisher.Mono<Integer> |
readProvisionedThroughput()
Gets the throughput of the container
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
replace(CosmosContainerProperties containerSettings)
Replaces a document container.
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
replace(CosmosContainerProperties containerSettings,
CosmosContainerRequestOptions options)
Replaces a document container.
|
<T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> |
replaceItem(T item,
String itemId,
PartitionKey partitionKey)
Replaces an item with the passed in item.
|
<T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> |
replaceItem(T item,
String itemId,
PartitionKey partitionKey,
CosmosItemRequestOptions options)
Replaces an item with the passed in item.
|
reactor.core.publisher.Mono<Integer> |
replaceProvisionedThroughput(int requestUnitsPerSecond)
Sets throughput provisioned for a container in measurement of
Requests-per-Unit in the Azure Cosmos service.
|
<T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> |
upsertItem(T item)
Upserts an item.
|
<T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> |
upsertItem(T item,
CosmosItemRequestOptions options)
Upserts a cosmos item.
|
public String getId()
CosmosAsyncContainer
CosmosAsyncContainer
public reactor.core.publisher.Mono<CosmosAsyncContainerResponse> read()
After subscription the operation will be performed. The Mono
upon
successful completion will contain a single cosmos container response with
the read container. In case of failure the Mono
will error.
Mono
containing the single cosmos container response with
the read container or an error.public reactor.core.publisher.Mono<CosmosAsyncContainerResponse> read(CosmosContainerRequestOptions options)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a single cosmos container response with
the read container. In case of failure the Mono
will error.
options
- The cosmos container request options.Mono
containing the single cosmos container response with
the read container or an error.public reactor.core.publisher.Mono<CosmosAsyncContainerResponse> delete(CosmosContainerRequestOptions options)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a single cosmos container response for the
deleted database. In case of failure the Mono
will error.
options
- the request options.Mono
containing the single cosmos container response for
the deleted database or an error.public reactor.core.publisher.Mono<CosmosAsyncContainerResponse> delete()
After subscription the operation will be performed. The Mono
upon
successful completion will contain a single cosmos container response for the
deleted container. In case of failure the Mono
will error.
Mono
containing the single cosmos container response for
the deleted container or an error.public reactor.core.publisher.Mono<CosmosAsyncContainerResponse> replace(CosmosContainerProperties containerSettings)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a single cosmos container response with
the replaced document container. In case of failure the Mono
will
error.
containerSettings
- the item container propertiesMono
containing the single cosmos container response with
the replaced document container or an error.public reactor.core.publisher.Mono<CosmosAsyncContainerResponse> replace(CosmosContainerProperties containerSettings, CosmosContainerRequestOptions options)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a single cosmos container response with
the replaced document container. In case of failure the Mono
will
error.
containerSettings
- the item container propertiesoptions
- the cosmos container request options.Mono
containing the single cosmos container response with
the replaced document container or an error.public <T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> createItem(T item)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a single resource response with the
created cosmos item. In case of failure the Mono
will error.
item
- the cosmos item represented as a POJO or cosmos item object.Mono
containing the single resource response with the
created cosmos item or an error.public <T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> createItem(T item, PartitionKey partitionKey, CosmosItemRequestOptions options)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a single resource response with the
created cosmos item. In case of failure the Mono
will error.
T
- the type parameteritem
- the cosmos item represented as a POJO or cosmos item object.partitionKey
- the partition keyoptions
- the request options.Mono
containing the single resource response with the created cosmos item or an error.public <T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> createItem(T item, CosmosItemRequestOptions options)
public <T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> upsertItem(T item)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a single resource response with the
upserted item. In case of failure the Mono
will error.
item
- the item represented as a POJO or Item object to upsert.Mono
containing the single resource response with the upserted document or an error.public <T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> upsertItem(T item, CosmosItemRequestOptions options)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a single resource response with the
upserted item. In case of failure the Mono
will error.
item
- the item represented as a POJO or Item object to upsert.options
- the request options.Mono
containing the single resource response with the upserted document or an error.public <T> CosmosContinuablePagedFlux<T> readAllItems(Class<T> klass)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the read cosmos items. In case of
failure the CosmosContinuablePagedFlux
will error.
T
- the type parameterklass
- the class typeCosmosContinuablePagedFlux
containing one or several feed response pages of the read cosmos items or an error.public <T> CosmosContinuablePagedFlux<T> readAllItems(FeedOptions options, Class<T> klass)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the read cosmos items. In case of
failure the CosmosContinuablePagedFlux
will error.
T
- the type parameteroptions
- the feed options.klass
- the class typeCosmosContinuablePagedFlux
containing one or several feed response pages of the read cosmos items or an error.public <T> CosmosContinuablePagedFlux<T> queryItems(String query, Class<T> klass)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the obtained items. In case of
failure the CosmosContinuablePagedFlux
will error.
T
- the type parameterquery
- the query.klass
- the class typeCosmosContinuablePagedFlux
containing one or several feed response pages of the obtained items or an error.public <T> CosmosContinuablePagedFlux<T> queryItems(String query, FeedOptions options, Class<T> klass)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the obtained items. In case of
failure the CosmosContinuablePagedFlux
will error.
T
- the type parameterquery
- the query.options
- the feed options.klass
- the class typeCosmosContinuablePagedFlux
containing one or several feed response pages of the obtained items or an error.public <T> CosmosContinuablePagedFlux<T> queryItems(SqlQuerySpec querySpec, Class<T> klass)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the obtained items. In case of
failure the CosmosContinuablePagedFlux
will error.
T
- the type parameterquerySpec
- the SQL query specification.klass
- the class typeCosmosContinuablePagedFlux
containing one or several feed response pages of the obtained items or an error.public <T> CosmosContinuablePagedFlux<T> queryItems(SqlQuerySpec querySpec, FeedOptions options, Class<T> klass)
After subscription the operation will be performed. The Flux
will
contain one or several feed response of the obtained items. In case of
failure the CosmosContinuablePagedFlux
will error.
T
- the type parameterquerySpec
- the SQL query specification.options
- the feed options.klass
- the class typeCosmosContinuablePagedFlux
containing one or several feed response pages of the obtained items or an error.public <T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> readItem(String itemId, PartitionKey partitionKey, Class<T> itemType)
After subscription the operation will be performed.
The Mono
upon successful completion will contain a cosmos item response with the read item
In case of failure the Mono
will error.
T
- the type parameteritemId
- the item idpartitionKey
- the partition keyitemType
- the item typeMono
containing the cosmos item response with the read item or an errorpublic <T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> readItem(String itemId, PartitionKey partitionKey, CosmosItemRequestOptions options, Class<T> itemType)
After subscription the operation will be performed.
The Mono
upon successful completion will contain a cosmos item response with the read item
In case of failure the Mono
will error.
itemId
- the item idpartitionKey
- the partition keyoptions
- the request cosmosItemRequestOptionsMono
containing the cosmos item response with the read item or an errorpublic <T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> replaceItem(T item, String itemId, PartitionKey partitionKey)
After subscription the operation will be performed.
The Mono
upon successful completion will contain a single cosmos item response with the replaced item.
In case of failure the Mono
will error.
item
- the item to replace (containing the document id).itemId
- the item idpartitionKey
- the partition keyMono
containing the cosmos item resource response with the replaced item or an error.public <T> reactor.core.publisher.Mono<CosmosAsyncItemResponse<T>> replaceItem(T item, String itemId, PartitionKey partitionKey, CosmosItemRequestOptions options)
After subscription the operation will be performed.
The Mono
upon successful completion will contain a single cosmos item response with the replaced item.
In case of failure the Mono
will error.
item
- the item to replace (containing the document id).itemId
- the item idpartitionKey
- the partition keyoptions
- the request comosItemRequestOptionsMono
containing the cosmos item resource response with the replaced item or an error.public reactor.core.publisher.Mono<CosmosAsyncItemResponse> deleteItem(String itemId, PartitionKey partitionKey)
After subscription the operation will be performed.
The Mono
upon successful completion will contain a single cosmos item response with the replaced item.
In case of failure the Mono
will error.
itemId
- the item idpartitionKey
- the partition keyMono
containing the cosmos item resource response.public reactor.core.publisher.Mono<CosmosAsyncItemResponse> deleteItem(String itemId, PartitionKey partitionKey, CosmosItemRequestOptions options)
After subscription the operation will be performed.
The Mono
upon successful completion will contain a single cosmos item response with the replaced item.
In case of failure the Mono
will error.
itemId
- id of the itempartitionKey
- partitionKey of the itemoptions
- the request optionsMono
containing the cosmos item resource response.public CosmosAsyncScripts getScripts()
public CosmosContinuablePagedFlux<CosmosConflictProperties> readAllConflicts(FeedOptions options)
options
- the feed optionsCosmosContinuablePagedFlux
containing one or several feed response pages of the
obtained conflicts or an error.public CosmosContinuablePagedFlux<CosmosConflictProperties> queryConflicts(String query)
query
- the queryCosmosContinuablePagedFlux
containing one or several feed response pages of the
obtained conflicts or an error.public CosmosContinuablePagedFlux<CosmosConflictProperties> queryConflicts(String query, FeedOptions options)
query
- the queryoptions
- the feed optionsCosmosContinuablePagedFlux
containing one or several feed response pages of the
obtained conflicts or an error.public CosmosAsyncConflict getConflict(String id)
id
- id of the cosmos conflictpublic reactor.core.publisher.Mono<Integer> readProvisionedThroughput()
Mono
containing throughput or an error.public reactor.core.publisher.Mono<Integer> replaceProvisionedThroughput(int requestUnitsPerSecond)
requestUnitsPerSecond
- the cosmos container throughput, expressed in
Request Units per secondMono
containing throughput or an error.public CosmosAsyncDatabase getDatabase()
CosmosAsyncDatabase
Copyright © 2020 Microsoft Corporation. All rights reserved.