RequestOptions Class
- java.
lang. Object - com.
microsoft. azure. documentdb. RequestOptions
- com.
public class RequestOptions
Encapsulates options that can be specified for a request issued to the Azure Cosmos DB database service.
Method Summary
Modifier and Type | Method and Description |
---|---|
Access |
getAccessCondition()
Gets the conditions associated with the request. |
Consistency |
getConsistencyLevel()
Gets the consistency level required for the request. |
boolean |
getDisableRUPerMinuteUsage()
Gets the disableRUPerMinuteUsage for the current request in the Azure Cosmos DB database service. disableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity to serve the request if regular provisioned RUs/second is exhausted. |
Indexing |
getIndexingDirective()
Gets the indexing directive (index, do not index etc). |
boolean |
getOfferEnableRUPerMinuteThroughput()
Gets offerEnableRUPerMinuteThroughput for a collection in the Azure Cosmos DB database service. |
Integer |
getOfferThroughput()
Gets the throughput in the form of Request Units per second when creating a document collection. |
String |
getOfferType()
Gets the offer type when creating a document collection. |
Partition |
getPartitionKey()
Gets the partition key used to identify the current request's target partition. |
List<String> |
getPostTriggerInclude()
Gets the triggers to be invoked after the operation. |
List<String> |
getPreTriggerInclude()
Gets the triggers to be invoked before the operation. |
Integer |
getResourceTokenExpirySeconds()
Gets the expiry time for resource token. Used when creating, updating, reading permission. |
String |
getSessionToken()
Gets the token for use with session consistency. |
boolean |
isPopulatePartitionKeyRangeStatistics()
Gets populatePartitionKeyRangeStatistics for a collection in the Azure Cosmos DB database service. |
boolean |
isPopulateQuotaInfo()
Gets the PopulateQuotaInfo setting for document collection read requests in the Azure Cosmos DB database service. PopulateQuotaInfo is used to enable/disable getting document collection quota related stats for document collection read requests. |
boolean |
isScriptLoggingEnabled()
Gets whether Javascript stored procedure logging is enabled for the current request in the Azure Cosmos DB database service or not. |
void |
setAccessCondition(AccessCondition accessCondition)
Sets the conditions associated with the request. |
void |
setConsistencyLevel(ConsistencyLevel consistencyLevel)
Sets the consistency level required for the request. |
void |
setCustomRequestOption(String key, String value)
Sets the custom request option value by key |
void |
setDisableRUPerMinuteUsage(boolean disableRUPerMinuteUsage)
Sets the disableRUPerMinuteUsage for the current request in the Azure Cosmos DB database service. disableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity to serve the request if regular provisioned RUs/second is exhausted. |
void |
setIndexingDirective(IndexingDirective indexingDirective)
Sets the indexing directive (index, do not index etc). |
void |
setOfferEnableRUPerMinuteThroughput(boolean offerEnableRUPerMinuteThroughput)
Sets offerEnableRUPerMinuteThroughput for a collection in the Azure Cosmos DB database service. |
void |
setOfferThroughput(Integer offerThroughput)
Sets the throughput in the form of Request Units per second when creating a document collection. |
void |
setOfferType(String offerType)
Sets the offer type when creating a document collection. |
void |
setPartitionKey(PartitionKey partitionkey)
Sets the partition key used to identify the current request's target partition. |
void |
setPartitionKeyRengeId(String partitionKeyRangeId)
Internal usage only: Sets the partition key range id used to identify the current request's target partition. |
void |
setPopulatePartitionKeyRangeStatistics(boolean populatePartitionKeyRangeStatistics)
Sets populatePartitionKeyRangeStatistics for a collection in the Azure Cosmos DB database service. |
void |
setPopulateQuotaInfo(boolean populateQuotaInfo)
Sets the PopulateQuotaInfo setting for document collection read requests in the Azure Cosmos DB database service. PopulateQuotaInfo is used to enable/disable getting document collection quota related stats for document collection read requests. |
void |
setPostTriggerInclude(List<String> postTriggerInclude)
Sets the triggers to be invoked after the operation. |
void |
setPreTriggerInclude(List<String> preTriggerInclude)
Sets the triggers to be invoked before the operation. |
void |
setResourceTokenExpirySeconds(Integer resourceTokenExpirySeconds)
Sets the expiry time for resource token. Used when creating, updating, reading permission. |
void |
setScriptLoggingEnabled(boolean scriptLoggingEnabled)
Sets whether Javascript stored procedure logging is enabled for the current request in the Azure Cosmos DB database service or not. |
void |
setSessionToken(String sessionToken)
Sets the token for use with session consistency. |
Method Details
getAccessCondition
public AccessCondition getAccessCondition()
Gets the conditions associated with the request.
Returns:
getConsistencyLevel
public ConsistencyLevel getConsistencyLevel()
Gets the consistency level required for the request.
Returns:
getDisableRUPerMinuteUsage
public boolean getDisableRUPerMinuteUsage()
Gets the disableRUPerMinuteUsage for the current request in the Azure Cosmos DB database service.
disableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity to serve the request if regular provisioned RUs/second is exhausted.
Returns:
getIndexingDirective
public IndexingDirective getIndexingDirective()
Gets the indexing directive (index, do not index etc).
Returns:
getOfferEnableRUPerMinuteThroughput
public boolean getOfferEnableRUPerMinuteThroughput()
Gets offerEnableRUPerMinuteThroughput for a collection in the Azure Cosmos DB database service.
Returns:
getOfferThroughput
public Integer getOfferThroughput()
Gets the throughput in the form of Request Units per second when creating a document collection.
Returns:
getOfferType
public String getOfferType()
Gets the offer type when creating a document collection.
Returns:
getPartitionKey
public PartitionKey getPartitionKey()
Gets the partition key used to identify the current request's target partition.
Returns:
getPostTriggerInclude
public List
Gets the triggers to be invoked after the operation.
Returns:
getPreTriggerInclude
public List
Gets the triggers to be invoked before the operation.
Returns:
getResourceTokenExpirySeconds
public Integer getResourceTokenExpirySeconds()
Gets the expiry time for resource token. Used when creating, updating, reading permission.
Returns:
getSessionToken
public String getSessionToken()
Gets the token for use with session consistency.
Returns:
isPopulatePartitionKeyRangeStatistics
public boolean isPopulatePartitionKeyRangeStatistics()
Gets populatePartitionKeyRangeStatistics for a collection in the Azure Cosmos DB database service.
Returns:
isPopulateQuotaInfo
public boolean isPopulateQuotaInfo()
Gets the PopulateQuotaInfo setting for document collection read requests in the Azure Cosmos DB database service. PopulateQuotaInfo is used to enable/disable getting document collection quota related stats for document collection read requests.
Returns:
isScriptLoggingEnabled
public boolean isScriptLoggingEnabled()
Gets whether Javascript stored procedure logging is enabled for the current request in the Azure Cosmos DB database service or not.
Returns:
setAccessCondition
public void setAccessCondition(AccessCondition accessCondition)
Sets the conditions associated with the request.
Parameters:
setConsistencyLevel
public void setConsistencyLevel(ConsistencyLevel consistencyLevel)
Sets the consistency level required for the request.
Parameters:
setCustomRequestOption
public void setCustomRequestOption(String key, String value)
Sets the custom request option value by key
Parameters:
setDisableRUPerMinuteUsage
public void setDisableRUPerMinuteUsage(boolean disableRUPerMinuteUsage)
Sets the disableRUPerMinuteUsage for the current request in the Azure Cosmos DB database service.
disableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity to serve the request if regular provisioned RUs/second is exhausted.
Parameters:
setIndexingDirective
public void setIndexingDirective(IndexingDirective indexingDirective)
Sets the indexing directive (index, do not index etc).
Parameters:
setOfferEnableRUPerMinuteThroughput
public void setOfferEnableRUPerMinuteThroughput(boolean offerEnableRUPerMinuteThroughput)
Sets offerEnableRUPerMinuteThroughput for a collection in the Azure Cosmos DB database service.
Parameters:
setOfferThroughput
public void setOfferThroughput(Integer offerThroughput)
Sets the throughput in the form of Request Units per second when creating a document collection.
Parameters:
setOfferType
public void setOfferType(String offerType)
Sets the offer type when creating a document collection.
Parameters:
setPartitionKey
public void setPartitionKey(PartitionKey partitionkey)
Sets the partition key used to identify the current request's target partition.
Parameters:
setPartitionKeyRengeId
protected void setPartitionKeyRengeId(String partitionKeyRangeId)
Internal usage only: Sets the partition key range id used to identify the current request's target partition.
Parameters:
setPopulatePartitionKeyRangeStatistics
public void setPopulatePartitionKeyRangeStatistics(boolean populatePartitionKeyRangeStatistics)
Sets populatePartitionKeyRangeStatistics for a collection in the Azure Cosmos DB database service.
Parameters:
setPopulateQuotaInfo
public void setPopulateQuotaInfo(boolean populateQuotaInfo)
Sets the PopulateQuotaInfo setting for document collection read requests in the Azure Cosmos DB database service. PopulateQuotaInfo is used to enable/disable getting document collection quota related stats for document collection read requests.
Parameters:
setPostTriggerInclude
public void setPostTriggerInclude(List
Sets the triggers to be invoked after the operation.
Parameters:
setPreTriggerInclude
public void setPreTriggerInclude(List
Sets the triggers to be invoked before the operation.
Parameters:
setResourceTokenExpirySeconds
public void setResourceTokenExpirySeconds(Integer resourceTokenExpirySeconds)
Sets the expiry time for resource token. Used when creating, updating, reading permission.
Parameters:
setScriptLoggingEnabled
public void setScriptLoggingEnabled(boolean scriptLoggingEnabled)
Sets whether Javascript stored procedure logging is enabled for the current request in the Azure Cosmos DB database service or not.
Parameters:
setSessionToken
public void setSessionToken(String sessionToken)
Sets the token for use with session consistency.
Parameters:
Applies to
Azure SDK for Java