public final class FeedOptions extends Object
Constructor and Description |
---|
FeedOptions()
Instantiates a new Feed options.
|
FeedOptions(FeedOptions options)
Instantiates a new Feed options.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Integer |
getMaxItemCount()
Gets the maximum number of items to be returned in the enumeration
operation.
|
PartitionKey |
getPartitionKey()
Gets the partition key used to identify the current request's target
partition.
|
Map<String,Object> |
getProperties()
Gets the properties
|
String |
getRequestContinuation()
Gets the request continuation token.
|
FeedOptions |
getResponseContinuationTokenLimitInKb(int limitInKb)
Sets the ResponseContinuationTokenLimitInKb request option for document query
requests in the Azure Cosmos DB service.
|
String |
getSessionToken()
Gets the session token for use with session consistency.
|
Boolean |
isEmitVerboseTracesInQuery()
Gets the option to allow queries to emit out verbose traces for
investigation.
|
boolean |
isEmptyPagesAllowed()
Gets the option to allow empty result pages in feed response.
|
boolean |
isPopulateQueryMetrics()
Gets the option to enable populate query metrics
|
Boolean |
isScanInQueryEnabled()
Gets the option to allow scan on the queries which couldn't be served as
indexing was opted out on the requested paths.
|
FeedOptions |
setEmitVerboseTracesInQuery(Boolean emitVerboseTracesInQuery)
Sets the option to allow queries to emit out verbose traces for
investigation.
|
void |
setEmptyPagesAllowed(boolean emptyPagesAllowed)
Sets the option to allow empty result pages in feed response.
|
FeedOptions |
setMaxBufferedItemCount(int maxBufferedItemCount)
Sets the maximum number of items that can be buffered client side during
parallel query execution.
|
FeedOptions |
setMaxDegreeOfParallelism(int maxDegreeOfParallelism)
Sets the number of concurrent operations run client side during parallel
query execution.
|
FeedOptions |
setMaxItemCount(Integer maxItemCount)
Sets the maximum number of items to be returned in the enumeration
operation.
|
FeedOptions |
setPartitionKey(PartitionKey partitionkey)
Sets the partition key used to identify the current request's target
partition.
|
FeedOptions |
setPopulateQueryMetrics(boolean populateQueryMetrics)
Sets the option to enable/disable getting metrics relating to query execution on document query requests
|
FeedOptions |
setProperties(Map<String,Object> properties)
Sets the properties used to identify the request token.
|
FeedOptions |
setRequestContinuation(String requestContinuation)
Sets the request continuation token.
|
int |
setResponseContinuationTokenLimitInKb()
Gets the ResponseContinuationTokenLimitInKb request option for document query
requests in the Azure Cosmos DB service.
|
FeedOptions |
setScanInQueryEnabled(Boolean scanInQueryEnabled)
Sets the option to allow scan on the queries which couldn't be served as
indexing was opted out on the requested paths.
|
FeedOptions |
setSessionToken(String sessionToken)
Sets the session token for use with session consistency.
|
public FeedOptions()
public FeedOptions(FeedOptions options)
options
- the optionspublic String getSessionToken()
public FeedOptions setSessionToken(String sessionToken)
sessionToken
- the session token.public Boolean isScanInQueryEnabled()
public FeedOptions setScanInQueryEnabled(Boolean scanInQueryEnabled)
scanInQueryEnabled
- the option of enable scan in query.public Boolean isEmitVerboseTracesInQuery()
public FeedOptions setEmitVerboseTracesInQuery(Boolean emitVerboseTracesInQuery)
emitVerboseTracesInQuery
- the emit verbose traces in query.public int getMaxDegreeOfParallelism()
public FeedOptions setMaxDegreeOfParallelism(int maxDegreeOfParallelism)
maxDegreeOfParallelism
- number of concurrent operations.public int getMaxBufferedItemCount()
public FeedOptions setMaxBufferedItemCount(int maxBufferedItemCount)
maxBufferedItemCount
- maximum number of items.public FeedOptions getResponseContinuationTokenLimitInKb(int limitInKb)
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.
limitInKb
- continuation token size limit.public int setResponseContinuationTokenLimitInKb()
ResponseContinuationTokenLimitInKb is used to limit the length of continuation token in the query response. Valid values are >= 1.
public Integer getMaxItemCount()
public FeedOptions setMaxItemCount(Integer maxItemCount)
maxItemCount
- the max number of items.public String getRequestContinuation()
public FeedOptions setRequestContinuation(String requestContinuation)
requestContinuation
- the request continuation.public PartitionKey getPartitionKey()
public FeedOptions setPartitionKey(PartitionKey partitionkey)
partitionkey
- the partition key value.public boolean isPopulateQueryMetrics()
public FeedOptions setPopulateQueryMetrics(boolean populateQueryMetrics)
populateQueryMetrics
- whether to enable or disable query metricspublic Map<String,Object> getProperties()
public FeedOptions setProperties(Map<String,Object> properties)
properties
- the properties.public boolean isEmptyPagesAllowed()
public void setEmptyPagesAllowed(boolean emptyPagesAllowed)
emptyPagesAllowed
- whether to allow empty pages in feed responseCopyright © 2020 Microsoft Corporation. All rights reserved.