Class CosmosContainerRequestOptions


  • public class CosmosContainerRequestOptions
    extends Object
    Encapsulates options that can be specified for a request issued to cosmos container.
    • Constructor Detail

      • CosmosContainerRequestOptions

        public CosmosContainerRequestOptions()
    • Method Detail

      • populateQuotaInfo

        public boolean populateQuotaInfo()
        Gets the PopulateQuotaInfo setting for cosmos container read requests in the Azure Cosmos DB database service. PopulateQuotaInfo is used to enable/disable getting cosmos container quota related stats for document collection read requests.
        Returns:
        true if PopulateQuotaInfo is enabled
      • populateQuotaInfo

        public CosmosContainerRequestOptions populateQuotaInfo​(boolean populateQuotaInfo)
        Sets the PopulateQuotaInfo setting for cosmos container read requests in the Azure Cosmos DB database service. PopulateQuotaInfo is used to enable/disable getting cosmos container quota related stats for document collection read requests.
        Parameters:
        populateQuotaInfo - a boolean value indicating whether PopulateQuotaInfo is enabled or not
        Returns:
        the current request options
      • consistencyLevel

        public ConsistencyLevel consistencyLevel()
        Gets the consistency level required for the request.
        Returns:
        the consistency level.
      • consistencyLevel

        public CosmosContainerRequestOptions consistencyLevel​(ConsistencyLevel consistencyLevel)
        Sets the consistency level required for the request.
        Parameters:
        consistencyLevel - the consistency level.
        Returns:
        the current request options
      • sessionToken

        public String sessionToken()
        Gets the token for use with session consistency.
        Returns:
        the session token.
      • sessionToken

        public CosmosContainerRequestOptions sessionToken​(String sessionToken)
        Sets the token for use with session consistency.
        Parameters:
        sessionToken - the session token.
        Returns:
        the current request options
      • accessCondition

        public AccessCondition accessCondition()
        Gets the conditions associated with the request.
        Returns:
        the access condition.
      • accessCondition

        public CosmosContainerRequestOptions accessCondition​(AccessCondition accessCondition)
        Sets the conditions associated with the request.
        Parameters:
        accessCondition - the access condition.
        Returns:
        the current request options