Compartilhar via


FeedOptions Class

public final 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
java.lang.Boolean getDisableRUPerMinuteUsage()

Gets disableRUPerMinuteUsage option for the current query in the Azure Cosmos DB database service.

java.lang.Boolean getEmitVerboseTracesInQuery()

Gets the option to allow queries to emit out verbose traces for investigation.

java.lang.Boolean getEnableCrossPartitionQuery()

Gets the option to allow queries to run across all partitions of the collection.

java.lang.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.

PartitionKey getPartitionKey()

Gets the partition key used to identify the current request's target partition.

java.lang.String getPartitionKeyRangeIdInternal()

Gets the partitionKeyRangeId.

int getResponseContinuationTokenLimitInKb()

Gets the ResponseContinuationTokenLimitInKb request option for document query requests in the Azure Cosmos DB service.

java.lang.String getSessionToken()

Gets the session token for use with session consistency.

void setDisableRUPerMinuteUsage(boolean disableRUPerMinuteUsage)

Sets the disableRUPerMinuteUsage option for the current query in the Azure Cosmos DB database service.

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 setPartitionKey(PartitionKey partitionkey)

Sets the partition key used to identify the current request's target partition.

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.

void setSessionToken(String sessionToken)

Sets the session token for use with session consistency.

Methods inherited from FeedOptionsBase

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

FeedOptions

public FeedOptions()

FeedOptions

public FeedOptions(FeedOptions options)

Parameters:

options

Method Details

getDisableRUPerMinuteUsage

public Boolean getDisableRUPerMinuteUsage()

Gets disableRUPerMinuteUsage option for the current query in the Azure Cosmos DB database service.

Returns:

true if disableRUPerMinuteUsage is set; otherwise false

getEmitVerboseTracesInQuery

public Boolean getEmitVerboseTracesInQuery()

Gets the option to allow queries to emit out verbose traces for investigation.

Returns:

the emit verbose traces in query.

getEnableCrossPartitionQuery

public Boolean getEnableCrossPartitionQuery()

Gets the option to allow queries to run across all partitions of the collection.

Returns:

whether to allow queries to run across all partitions of the collection.

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:

the option of enable scan in query.

getMaxBufferedItemCount

public int getMaxBufferedItemCount()

Gets the maximum number of items that can be buffered client side during parallel query execution.

Returns:

maximum number of items that can be buffered client side during parallel query execution.

getMaxDegreeOfParallelism

public int getMaxDegreeOfParallelism()

Gets the number of concurrent operations run client side during parallel query execution.

Returns:

number of concurrent operations run client side during parallel query execution.

getPartitionKey

public PartitionKey getPartitionKey()

Gets the partition key used to identify the current request's target partition.

Returns:

the partition key.

getPartitionKeyRangeIdInternal

public String getPartitionKeyRangeIdInternal()

Gets the partitionKeyRangeId.

Returns:

the partitionKeyRangeId.

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:

return set ResponseContinuationTokenLimitInKb, or 0 if not set

getSessionToken

public String getSessionToken()

Gets the session token for use with session consistency.

Returns:

the session token.

setDisableRUPerMinuteUsage

public void setDisableRUPerMinuteUsage(boolean disableRUPerMinuteUsage)

Sets the disableRUPerMinuteUsage option for the current query in the Azure Cosmos DB database service. disableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity to serve the query if regular provisioned RUs/second is exhausted.

Parameters:

disableRUPerMinuteUsage - used to set disableRUPerMinuteUsage

setEmitVerboseTracesInQuery

public void setEmitVerboseTracesInQuery(Boolean emitVerboseTracesInQuery)

Sets the option to allow queries to emit out verbose traces for investigation.

Parameters:

emitVerboseTracesInQuery - the emit verbose traces in query.

setEnableCrossPartitionQuery

public void setEnableCrossPartitionQuery(Boolean enableCrossPartitionQuery)

Sets the option to allow queries to run across all partitions of the collection.

Parameters:

enableCrossPartitionQuery - whether to allow queries to run across all partitions of the collection.

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:

enableScanInQuery - the option of enable scan in query.

setMaxBufferedItemCount

public void setMaxBufferedItemCount(int maxBufferedItemCount)

Sets the maximum number of items that can be buffered client side during parallel query execution.

Parameters:

maxBufferedItemCount - maximum number of items.

setMaxDegreeOfParallelism

public void setMaxDegreeOfParallelism(int maxDegreeOfParallelism)

Sets the number of concurrent operations run client side during parallel query execution.

Parameters:

maxDegreeOfParallelism - number of concurrent operations.

setPartitionKey

public void setPartitionKey(PartitionKey partitionkey)

Sets the partition key used to identify the current request's target partition.

Parameters:

partitionkey - the partition key value.

setPartitionKeyRangeIdInternal

public void setPartitionKeyRangeIdInternal(String partitionKeyRangeId)

Sets the partitionKeyRangeId.

Parameters:

partitionKeyRangeId - the partitionKeyRangeId.

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:

limitInKb - continuation token size limit.

setSessionToken

public void setSessionToken(String sessionToken)

Sets the session token for use with session consistency.

Parameters:

sessionToken - the session token.

Applies to