Class CosmosBatchRequestOptions

java.lang.Object
com.azure.cosmos.models.CosmosBatchRequestOptions

public final class CosmosBatchRequestOptions extends Object
Encapsulates options that can be specified for a CosmosBatch.
  • Constructor Details

    • CosmosBatchRequestOptions

      public CosmosBatchRequestOptions()
  • Method Details

    • getSessionToken

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

      public CosmosBatchRequestOptions setSessionToken(String sessionToken)
      Sets the token for use with session consistency.
      Parameters:
      sessionToken - the session token.
      Returns:
      the TransactionalBatchRequestOptions.
    • setDiagnosticsThresholds

      public CosmosBatchRequestOptions setDiagnosticsThresholds(CosmosDiagnosticsThresholds operationSpecificThresholds)
      Allows overriding the diagnostic thresholds for a specific operation.
      Parameters:
      operationSpecificThresholds - the diagnostic threshold override for this operation
      Returns:
      the TransactionalBatchRequestOptions.
    • getDiagnosticsThresholds

      public CosmosDiagnosticsThresholds getDiagnosticsThresholds()
      Gets the diagnostic thresholds used as an override for a specific operation. If no operation specific diagnostic threshold has been specified, this method will return null, although at runtime the default thresholds specified at the client-level will be used.
      Returns:
      the diagnostic thresholds used as an override for a specific operation.
    • setExcludedRegions

      public CosmosBatchRequestOptions setExcludedRegions(List<String> excludeRegions)
      List of regions to exclude for the request/retries. Example "East US" or "East US, West US" These regions will be excluded from the preferred regions list
      Parameters:
      excludeRegions - list of regions
      Returns:
      the CosmosBatchRequestOptions
    • getExcludedRegions

      public List<String> getExcludedRegions()
      Gets the list of regions to be excluded for the request/retries. These regions are excluded from the preferred region list.
      Returns:
      a list of excluded regions