Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public void uniqueIndex() {
DocumentCollection collectionDefinition = new DocumentCollection();
collectionDefinition.setId(UUID.randomUUID().toString());
UniqueKeyPolicy uniqueKeyPolicy = new UniqueKeyPolicy();
UniqueKey uniqueKey = new UniqueKey();
uniqueKey.setPaths(ImmutableList.of("/name", "/field"));
UniqueKey uniqueKey = new UniqueKey(ImmutableList.of("/name", "/field"));
uniqueKeyPolicy.setUniqueKeys(Lists.newArrayList(uniqueKey));
collectionDefinition.setUniqueKeyPolicy(uniqueKeyPolicy);
PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public interface ChangeFeedProcessor {
/**
* Returns the current owner (host) and an approximation of the difference between the last processed item (defined
* by the state of the feed container) and the latest change in the container for each partition (lease
* document).
* item).
* <p>
* An empty map will be returned if the processor was not started or no lease documents matching the current
* An empty map will be returned if the processor was not started or no lease items matching the current
* {@link ChangeFeedProcessor} instance's lease prefix could be found.
*
* @return a map representing the current owner and lease token, the current LSN and latest LSN, and the estimated
Expand Down Expand Up @@ -111,7 +111,7 @@ interface BuilderDefinition {
BuilderDefinition hostName(String hostName);

/**
* Sets and existing {@link CosmosAsyncContainer} to be used to read from the monitored collection.
* Sets and existing {@link CosmosAsyncContainer} to be used to read from the monitored container.
*
* @param feedContainer the instance of {@link CosmosAsyncContainer} to be used.
* @return current Builder.
Expand Down Expand Up @@ -152,7 +152,7 @@ interface BuilderDefinition {
BuilderDefinition handleChanges(Consumer<List<JsonNode>> consumer);

/**
* Sets an existing {@link CosmosAsyncContainer} to be used to read from the leases collection.
* Sets an existing {@link CosmosAsyncContainer} to be used to read from the leases container.
*
* @param leaseContainer the instance of {@link CosmosAsyncContainer} to use.
* @return current Builder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public enum ConnectionMode {
/**
* Specifies that requests to server resources are made directly to the data nodes.
* <p>
* In DIRECT mode, all requests to server resources within a collection, such as documents, stored procedures
* In DIRECT mode, all requests to server resources within a container, such as items, stored procedures
* and user-defined functions, etc., are made directly to the data nodes within the target Cosmos DB cluster
* using either the HTTPS or TCP/SSL transport protocol.
* </p><p>
* Certain operations on account or database level resources, such as databases, collections and users, etc.,
* Certain operations on account or database level resources, such as databases, containers and users, etc.,
* are always routed through the gateway using HTTPS.
* </p>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public Mono<CosmosConflictResponse> read(CosmosConflictRequestOptions options) {
}

/**
* Reads all conflicts in a document collection.
* Reads all conflicts in a container.
* <p>
* After subscription the operation will be performed. The {@link Mono} will
* contain one or several feed response pages of the read conflicts. In case of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public Mono<CosmosContainerResponse> read(CosmosContainerRequestOptions options)
}

/**
* Deletes the item container
* Deletes the container
* <p>
* After subscription the operation will be performed. The {@link Mono} upon
* successful completion will contain a single Cosmos container response for the
Expand Down Expand Up @@ -134,7 +134,7 @@ public Mono<CosmosContainerResponse> delete() {
* the replaced container properties. In case of failure the {@link Mono} will
* error.
*
* @param containerProperties the item container properties
* @param containerProperties the container properties
* @return an {@link Mono} containing the single Cosmos container response with
* the replaced container properties or an error.
*/
Expand All @@ -150,7 +150,7 @@ public Mono<CosmosContainerResponse> replace(CosmosContainerProperties container
* the replaced container properties. In case of failure the {@link Mono} will
* error.
*
* @param containerProperties the item container properties
* @param containerProperties the container properties
* @param options the Cosmos container request options.
* @return an {@link Mono} containing the single Cosmos container response with
* the replaced container properties or an error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ public CosmosClientBuilder throttlingRetryOptions(ThrottlingRetryOptions throttl
* "East US" as the preferred region.
* <p>
* When EnableEndpointDiscovery is true and PreferredRegions is non-empty,
* the SDK will prefer to use the regions in the collection in the order
* the SDK will prefer to use the regions in the container in the order
* they are specified to perform operations.
* <p>
* If EnableEndpointDiscovery is set to false, this property is ignored.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
/**
* Represents the connection config with {@link ConnectionMode#DIRECT} associated with Cosmos Client in the Azure Cosmos DB database service.
* For performance tips on how to optimize Direct connection configuration,
* refer to performance tips guide: https://docs.microsoft.com/en-us/azure/cosmos-db/performance-tips-java-sdk-v4-sql?tabs=api-async
* refer to performance tips guide:
* <a href="https://docs.microsoft.com/en-us/azure/cosmos-db/performance-tips-java-sdk-v4-sql?tabs=api-async">Performance tips guide</a>
*/
public final class DirectConnectionConfig {
// Constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.Locale;

/**
* Represents a per-User Permission to access a specific resource e.g. Document or Collection in the Azure Cosmos DB
* Represents a per-User Permission to access a specific resource e.g. item or container in the Azure Cosmos DB
* database service.
*/
public final class Permission extends Resource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void setResourceTokenExpirySeconds(Integer resourceTokenExpirySeconds) {
}

/**
* Gets the offer type when creating a document collection.
* Gets the offer type when creating a container.
*
* @return the offer type.
*/
Expand All @@ -188,7 +188,7 @@ public String getOfferType() {
}

/**
* Sets the offer type when creating a document collection.
* Sets the offer type when creating a container.
*
* @param offerType the offer type.
*/
Expand All @@ -197,7 +197,7 @@ public void setOfferType(String offerType) {
}

/**
* Gets the throughput in the form of Request Units per second when creating a document collection.
* Gets the throughput in the form of Request Units per second when creating a container.
*
* @return the throughput value.
*/
Expand All @@ -206,7 +206,7 @@ public Integer getOfferThroughput() {
}

/**
* Sets the throughput in the form of Request Units per second when creating a document collection.
* Sets the throughput in the form of Request Units per second when creating a container.
*
* @param offerThroughput the throughput value.
*/
Expand Down Expand Up @@ -279,9 +279,9 @@ public void setScriptLoggingEnabled(boolean scriptLoggingEnabled) {
}

/**
* Gets the quotaInfoEnabled setting for document collection read requests in the Azure Cosmos DB database service.
* quotaInfoEnabled is used to enable/disable getting document collection quota related stats for document
* collection read requests.
* Gets the quotaInfoEnabled setting for container read requests in the Azure Cosmos DB database service.
* quotaInfoEnabled is used to enable/disable getting container quota related stats for item
* container read requests.
*
* @return true if quotaInfoEnabled is enabled
*/
Expand All @@ -290,9 +290,9 @@ public boolean isQuotaInfoEnabled() {
}

/**
* Sets the quotaInfoEnabled setting for document collection read requests in the Azure Cosmos DB database service.
* quotaInfoEnabled is used to enable/disable getting document collection quota related stats for document
* collection read requests.
* Sets the quotaInfoEnabled setting for container read requests in the Azure Cosmos DB database service.
* quotaInfoEnabled is used to enable/disable getting container quota related stats for item
* container read requests.
*
* @param quotaInfoEnabled a boolean value indicating whether quotaInfoEnabled is enabled or not
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <T> Mono<CosmosAsyncItemResponse<T>> readItem(String itemId, PartitionKey partit
CosmosItemRequestOptions options, Class<T> itemType);

/**
* Query for items in a document container.
* Query for items in a container.
*
* @param containerLink the reference to the parent container.
* @param querySpec the SQL query specification.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public ChangeFeedProcessorOptions setFeedPollDelay(Duration feedPollDelay) {
* Gets a prefix to be used as part of the lease ID.
* <p>
* This can be used to support multiple instances of {@link ChangeFeedProcessor} instances pointing at the same
* feed while using the same auxiliary collection.
* feed while using the same auxiliary container.
*
* @return a prefix to be used as part of the lease ID.
*/
Expand Down Expand Up @@ -180,10 +180,10 @@ public ChangeFeedProcessorOptions setMaxItemCount(int maxItemCount) {
/**
* Gets the start request continuation token to start looking for changes after.
* <p>
* This option can be used when lease store is not initialized and it is ignored if a lease document exists and
* This option can be used when lease store is not initialized and it is ignored if a lease item exists and
* has continuation token that is not null. If this is specified, both StartTime and StartFromBeginning are ignored.
*
* @return the string representing a continuation token that will be used to get document feeds starting with.
* @return the string representing a continuation token that will be used to get item feeds starting with.
*/
public String getStartContinuation() {
return this.startContinuation;
Expand All @@ -192,11 +192,11 @@ public String getStartContinuation() {
/**
* Sets the start request continuation token to start looking for changes after.
* <p>
* This option can be used when lease store is not initialized and it is ignored if a lease document exists and
* This option can be used when lease store is not initialized and it is ignored if a lease item exists and
* has continuation token that is not null. If this is specified, both StartTime and StartFromBeginning are ignored.
*
* @param startContinuation the start request continuation token to start looking for changes after.
* @return the string representing a continuation token that will be used to get document feeds starting with.
* @return the string representing a continuation token that will be used to get item feeds starting with.
*/
public ChangeFeedProcessorOptions setStartContinuation(String startContinuation) {
this.startContinuation = startContinuation;
Expand All @@ -207,7 +207,7 @@ public ChangeFeedProcessorOptions setStartContinuation(String startContinuation)
* Gets the time (exclusive) to start looking for changes after.
* <p>
* This option can be used when:
* (1) Lease documents are not initialized; this setting will be ignored if the lease documents exists and have a
* (1) Lease items are not initialized; this setting will be ignored if the lease items exists and have a
* valid continuation token.
* (2) Start continuation token option is not specified.
* If this option is specified, "start from beginning" option is ignored.
Expand All @@ -222,7 +222,7 @@ public OffsetDateTime getStartTime() {
* Sets the time (exclusive) to start looking for changes after (UTC time).
* <p>
* This option can be used when:
* (1) Lease documents are not initialized; this setting will be ignored if the lease documents exists and have a
* (1) Lease items are not initialized; this setting will be ignored if the lease items exists and have a
* valid continuation token.
* (2) Start continuation token option is not specified.
* If this option is specified, "start from beginning" option is ignored.
Expand All @@ -240,7 +240,7 @@ public ChangeFeedProcessorOptions setStartTime(OffsetDateTime startTime) {
* or from current (false). By default it's start from current (false).
* <p>
* This option can be used when:
* (1) Lease documents are not initialized; this setting will be ignored if the lease documents exists and have a
* (1) Lease items are not initialized; this setting will be ignored if the lease items exists and have a
* valid continuation token.
* (2) Start continuation token option is not specified.
* (3) Start time option is not specified.
Expand All @@ -255,7 +255,7 @@ public boolean isStartFromBeginning() {
* Sets a value indicating whether change feed in the Azure Cosmos DB service should start from beginning.
* <p>
* This option can be used when:
* (1) Lease documents are not initialized; this setting will be ignored if the lease documents exists and have a
* (1) Lease items are not initialized; this setting will be ignored if the lease items exists and have a
* valid continuation token.
* (2) Start continuation token option is not specified.
* (3) Start time option is not specified.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/**
* Represents the sorting order for a path in a composite index, for a
* collection in the Azure Cosmos DB database service.
* container in the Azure Cosmos DB database service.
*/
public enum CompositePathSortOrder {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public enum ConflictResolutionMode {
* Last writer wins conflict resolution mode
*
* Setting the ConflictResolutionMode to "LAST_WRITER_WINS" indicates that conflict resolution should be done by
* inspecting a field in the conflicting documents
* and picking the document which has the higher value in that path. See
* inspecting a field in the conflicting items
* and picking the item which has the higher value in that path. See
* {@link ConflictResolutionPolicy#getConflictResolutionPath()} for details on how to specify the path
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ public Duration getDuration() {

/**
* Gets the ETag from the response headers.
* This is only relevant when getting response from the server.
*
* Null in case of delete operation.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public String getResourceId() {

/**
* Get the last modified timestamp associated with the resource.
* This is only relevant when getting response from the server.
*
* @return the timestamp.
*/
Expand All @@ -95,6 +96,7 @@ public OffsetDateTime getTimestamp() {

/**
* Get the entity tag associated with the resource.
* This is only relevant when getting response from the server.
*
* @return the e tag.
*/
Expand Down
Loading