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.
Constructor Summary
Constructor | Description | |
---|---|---|
RequestOptions() |
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 disable |
Indexing |
getIndexingDirective()
Gets the indexing directive (index, do not index etc). |
boolean |
getOfferEnableRUPerMinuteThroughput()
Gets offer |
java.lang.Integer |
getOfferThroughput()
Gets the throughput in the form of Request Units per second when creating a document collection. |
java.lang.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. |
java.util.List<java.lang.String> |
getPostTriggerInclude()
Gets the triggers to be invoked after the operation. |
java.util.List<java.lang.String> |
getPreTriggerInclude()
Gets the triggers to be invoked before the operation. |
java.lang.Integer |
getResourceTokenExpirySeconds()
Gets the expiry time for resource token. |
java.lang.String |
getSessionToken()
Gets the token for use with session consistency. |
boolean |
isPopulatePartitionKeyRangeStatistics()
Gets populate |
boolean |
isPopulateQuotaInfo()
Gets the Populate |
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 disable |
void |
setIndexingDirective(IndexingDirective indexingDirective)
Sets the indexing directive (index, do not index etc). |
void |
setOfferEnableRUPerMinuteThroughput(boolean offerEnableRUPerMinuteThroughput)
Sets offer |
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. |
protected 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 populate |
void |
setPopulateQuotaInfo(boolean populateQuotaInfo)
Sets the Populate |
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. |
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. |
Methods inherited from java.lang.Object
Constructor Details
RequestOptions
public RequestOptions()
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