FeedOptions Class
- java.
lang. Object - FeedOptionsBase
- com.
microsoft. azure. cosmosdb. FeedOptions
- com.
public class FeedOptions extends FeedOptionsBase
Specifies the options associated with feed methods (enumeration operations) in the Azure Cosmos DB database service.
Constructor Summary
Constructor | Description | |
---|---|---|
FeedOptions() | ||
FeedOptions(FeedOptions options) |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean |
getAllowEmptyPages()
Gets the option to allow empty result pages in feed response. |
Boolean |
getEmitVerboseTracesInQuery()
Gets the option to allow queries to emit out verbose traces for investigation. |
Boolean |
getEnableCrossPartitionQuery()
Gets the option to allow queries to run across all partitions of the collection. |
Boolean |
getEnableScanInQuery()
Gets the option to allow scan on the queries which couldn't be served as indexing was opted out on the requested paths. |
int |
getMaxBufferedItemCount()
Gets the maximum number of items that can be buffered client side during parallel query execution. |
int |
getMaxDegreeOfParallelism()
Gets the number of concurrent operations run client side during parallel query execution. |
String |
getPartitionKeyRangeIdInternal()
Gets the partitionKeyRangeId. |
int |
getResponseContinuationTokenLimitInKb()
Gets the ResponseContinuationTokenLimitInKb request option for document query requests in the Azure Cosmos DB service. If not already set returns 0. ResponseContinuationTokenLimitInKb is used to limit the length of continuation token in the query response. Valid values are>= 1. |
String |
getSessionToken()
Gets the session token for use with session consistency. |
void |
setAllowEmptyPages(boolean allowEmptyPages)
Sets the option to allow empty result pages in feed response. Defaults to false |
void |
setEmitVerboseTracesInQuery(Boolean emitVerboseTracesInQuery)
Sets the option to allow queries to emit out verbose traces for investigation. |
void |
setEnableCrossPartitionQuery(Boolean enableCrossPartitionQuery)
Sets the option to allow queries to run across all partitions of the collection. |
void |
setEnableScanInQuery(Boolean enableScanInQuery)
Sets the option to allow scan on the queries which couldn't be served as indexing was opted out on the requested paths. |
void |
setMaxBufferedItemCount(int maxBufferedItemCount)
Sets the maximum number of items that can be buffered client side during parallel query execution. |
void |
setMaxDegreeOfParallelism(int maxDegreeOfParallelism)
Sets the number of concurrent operations run client side during parallel query execution. |
void |
setPartitionKeyRangeIdInternal(String partitionKeyRangeId)
Sets the partitionKeyRangeId. |
void |
setResponseContinuationTokenLimitInKb(int limitInKb)
Sets the ResponseContinuationTokenLimitInKb request option for document query requests in the Azure Cosmos DB service. ResponseContinuationTokenLimitInKb is used to limit the length of continuation token in the query response. Valid values are>= 1. The continuation token contains both required and optional fields. The required fields are necessary for resuming the execution from where it was stooped. The optional fields may contain serialized index lookup work that was done but not yet utilized. This avoids redoing the work again in subsequent continuations and hence improve the query performance. Setting the maximum continuation size to 1KB, the Azure Cosmos DB service will only serialize required fields. Starting from 2KB, the Azure Cosmos DB service would serialize as much as it could fit till it reaches the maximum specified size. |
void |
setSessionToken(String sessionToken)
Sets the session token for use with session consistency. |
Inherited Members
Constructor Details
FeedOptions
public FeedOptions()
FeedOptions
public FeedOptions(FeedOptions options)
Parameters:
Method Details
getAllowEmptyPages
public boolean getAllowEmptyPages()
Gets the option to allow empty result pages in feed response.
getEmitVerboseTracesInQuery
public Boolean getEmitVerboseTracesInQuery()
Gets the option to allow queries to emit out verbose traces for investigation.
Returns:
getEnableCrossPartitionQuery
public Boolean getEnableCrossPartitionQuery()
Gets the option to allow queries to run across all partitions of the collection.
Returns:
getEnableScanInQuery
public Boolean getEnableScanInQuery()
Gets the option to allow scan on the queries which couldn't be served as indexing was opted out on the requested paths.
Returns:
getMaxBufferedItemCount
public int getMaxBufferedItemCount()
Gets the maximum number of items that can be buffered client side during parallel query execution.
Returns:
getMaxDegreeOfParallelism
public int getMaxDegreeOfParallelism()
Gets the number of concurrent operations run client side during parallel query execution.
Returns:
getPartitionKeyRangeIdInternal
public String getPartitionKeyRangeIdInternal()
Gets the partitionKeyRangeId.
Returns:
getResponseContinuationTokenLimitInKb
public int getResponseContinuationTokenLimitInKb()
Gets the ResponseContinuationTokenLimitInKb request option for document query requests in the Azure Cosmos DB service. If not already set returns 0.
ResponseContinuationTokenLimitInKb is used to limit the length of continuation token in the query response. Valid values are>= 1.
Returns:
getSessionToken
public String getSessionToken()
Gets the session token for use with session consistency.
Returns:
setAllowEmptyPages
public void setAllowEmptyPages(boolean allowEmptyPages)
Sets the option to allow empty result pages in feed response. Defaults to false
Parameters:
setEmitVerboseTracesInQuery
public void setEmitVerboseTracesInQuery(Boolean emitVerboseTracesInQuery)
Sets the option to allow queries to emit out verbose traces for investigation.
Parameters:
setEnableCrossPartitionQuery
public void setEnableCrossPartitionQuery(Boolean enableCrossPartitionQuery)
Sets the option to allow queries to run across all partitions of the collection.
Parameters:
setEnableScanInQuery
public void setEnableScanInQuery(Boolean enableScanInQuery)
Sets the option to allow scan on the queries which couldn't be served as indexing was opted out on the requested paths.
Parameters:
setMaxBufferedItemCount
public void setMaxBufferedItemCount(int maxBufferedItemCount)
Sets the maximum number of items that can be buffered client side during parallel query execution.
Parameters:
setMaxDegreeOfParallelism
public void setMaxDegreeOfParallelism(int maxDegreeOfParallelism)
Sets the number of concurrent operations run client side during parallel query execution.
Parameters:
setPartitionKeyRangeIdInternal
public void setPartitionKeyRangeIdInternal(String partitionKeyRangeId)
Sets the partitionKeyRangeId.
Parameters:
setResponseContinuationTokenLimitInKb
public void setResponseContinuationTokenLimitInKb(int limitInKb)
Sets the ResponseContinuationTokenLimitInKb request option for document query requests in the Azure Cosmos DB service.
ResponseContinuationTokenLimitInKb is used to limit the length of continuation token in the query response. Valid values are>= 1.
The continuation token contains both required and optional fields. The required fields are necessary for resuming the execution from where it was stooped. The optional fields may contain serialized index lookup work that was done but not yet utilized. This avoids redoing the work again in subsequent continuations and hence improve the query performance. Setting the maximum continuation size to 1KB, the Azure Cosmos DB service will only serialize required fields. Starting from 2KB, the Azure Cosmos DB service would serialize as much as it could fit till it reaches the maximum specified size.
Parameters:
setSessionToken
public void setSessionToken(String sessionToken)
Sets the session token for use with session consistency.
Parameters:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for