public class CosmosContainer extends Object
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<CosmosItemResponse> |
createItem(Object item)
Creates a cosmos item.
|
reactor.core.publisher.Mono<CosmosItemResponse> |
createItem(Object item,
CosmosItemRequestOptions options)
Creates a cosmos item.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
delete()
Deletes the item container
After subscription the operation will be performed.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
delete(CosmosContainerRequestOptions options)
Deletes the item container
After subscription the operation will be performed.
|
CosmosConflict |
getConflict(String id)
Gets a CosmosConflict object without making a service call
|
CosmosDatabase |
getDatabase()
Gets the parent Database
|
CosmosItem |
getItem(String id,
Object partitionKey)
Gets a CosmosItem object without making a service call
|
CosmosScripts |
getScripts() |
String |
id()
Get the id of the
CosmosContainer |
reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> |
queryChangeFeedItems(ChangeFeedOptions changeFeedOptions)
Query for documents in a items in a container
After subscription the operation will be performed.
|
reactor.core.publisher.Flux<FeedResponse<CosmosConflictProperties>> |
queryConflicts(String query)
Queries all the conflicts in the container
|
reactor.core.publisher.Flux<FeedResponse<CosmosConflictProperties>> |
queryConflicts(String query,
FeedOptions options)
Queries all the conflicts in the container
|
reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> |
queryItems(SqlQuerySpec querySpec)
Query for documents in a items in a container
After subscription the operation will be performed.
|
reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> |
queryItems(SqlQuerySpec querySpec,
FeedOptions options)
Query for documents in a items in a container
After subscription the operation will be performed.
|
reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> |
queryItems(String query)
Query for documents in a items in a container
After subscription the operation will be performed.
|
reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> |
queryItems(String query,
FeedOptions options)
Query for documents in a items in a container
After subscription the operation will be performed.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
read()
Reads the document container
After subscription the operation will be performed.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
read(CosmosContainerRequestOptions options)
Reads the document container by the container link.
|
reactor.core.publisher.Flux<FeedResponse<CosmosConflictProperties>> |
readAllConflicts(FeedOptions options)
Lists all the conflicts in the container
|
reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> |
readAllItems()
Reads all cosmos items in the container.
|
reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> |
readAllItems(FeedOptions options)
Reads all cosmos items in a container.
|
reactor.core.publisher.Mono<Integer> |
readProvisionedThroughput()
Gets the throughput of the container
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
replace(CosmosContainerProperties containerSettings)
Replaces a document container.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
replace(CosmosContainerProperties containerSettings,
CosmosContainerRequestOptions options)
Replaces a document container.
|
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.
|
reactor.core.publisher.Mono<CosmosItemResponse> |
upsertItem(Object item)
Upserts an item.
|
reactor.core.publisher.Mono<CosmosItemResponse> |
upsertItem(Object item,
CosmosItemRequestOptions options)
Upserts a cosmos item.
|
public String id()
CosmosContainer
CosmosContainer
public reactor.core.publisher.Mono<CosmosContainerResponse> read()
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<CosmosContainerResponse> read(CosmosContainerRequestOptions options)
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<CosmosContainerResponse> delete(CosmosContainerRequestOptions options)
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<CosmosContainerResponse> delete()
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<CosmosContainerResponse> replace(CosmosContainerProperties containerSettings)
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<CosmosContainerResponse> replace(CosmosContainerProperties containerSettings, CosmosContainerRequestOptions options)
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 reactor.core.publisher.Mono<CosmosItemResponse> createItem(Object item)
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 reactor.core.publisher.Mono<CosmosItemResponse> createItem(Object item, CosmosItemRequestOptions options)
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.options
- the request options.Mono
containing the single resource response with the
created cosmos item or an error.public reactor.core.publisher.Mono<CosmosItemResponse> upsertItem(Object item)
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 reactor.core.publisher.Mono<CosmosItemResponse> upsertItem(Object item, CosmosItemRequestOptions options)
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 reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> readAllItems()
Flux
will
contain one or several feed response of the read cosmos items. In case of
failure the Flux
will error.Flux
containing one or several feed response pages of the
read cosmos items or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> readAllItems(FeedOptions options)
Flux
will
contain one or several feed response of the read cosmos items. In case of
failure the Flux
will error.options
- the feed options.Flux
containing one or several feed response pages of the
read cosmos items or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> queryItems(String query)
Flux
will
contain one or several feed response of the obtained items. In case of
failure the Flux
will error.query
- the query.Flux
containing one or several feed response pages of the
obtained items or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> queryItems(String query, FeedOptions options)
Flux
will
contain one or several feed response of the obtained items. In case of
failure the Flux
will error.query
- the query.options
- the feed options.Flux
containing one or several feed response pages of the
obtained items or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> queryItems(SqlQuerySpec querySpec)
Flux
will
contain one or several feed response of the obtained items. In case of
failure the Flux
will error.querySpec
- the SQL query specification.Flux
containing one or several feed response pages of the
obtained items or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> queryItems(SqlQuerySpec querySpec, FeedOptions options)
Flux
will
contain one or several feed response of the obtained items. In case of
failure the Flux
will error.querySpec
- the SQL query specification.options
- the feed options.Flux
containing one or several feed response pages of the
obtained items or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosItemProperties>> queryChangeFeedItems(ChangeFeedOptions changeFeedOptions)
Flux
will
contain one or several feed response of the obtained items. In case of
failure the Flux
will error.changeFeedOptions
- the feed options.Flux
containing one or several feed response pages of the
obtained items or an error.public CosmosItem getItem(String id, Object partitionKey)
id
- id of the itempartitionKey
- the partition keypublic CosmosScripts getScripts()
public reactor.core.publisher.Flux<FeedResponse<CosmosConflictProperties>> readAllConflicts(FeedOptions options)
options
- the feed optionsFlux
containing one or several feed response pages of the
obtained conflicts or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosConflictProperties>> queryConflicts(String query)
query
- the queryFlux
containing one or several feed response pages of the
obtained conflicts or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosConflictProperties>> queryConflicts(String query, FeedOptions options)
query
- the queryoptions
- the feed optionsFlux
containing one or several feed response pages of the
obtained conflicts or an error.public CosmosConflict 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 CosmosDatabase getDatabase()
CosmosDatabase
Copyright © 2019. All rights reserved.