Class ThresholdBasedAvailabilityStrategy

java.lang.Object
com.azure.cosmos.AvailabilityStrategy
com.azure.cosmos.ThresholdBasedAvailabilityStrategy

public final class ThresholdBasedAvailabilityStrategy extends AvailabilityStrategy
The type Threshold based retry availability strategy.
  • Constructor Details

    • ThresholdBasedAvailabilityStrategy

      public ThresholdBasedAvailabilityStrategy()
      Instantiates a new Threshold based retry availability strategy.
    • ThresholdBasedAvailabilityStrategy

      public ThresholdBasedAvailabilityStrategy(Duration threshold, Duration thresholdStep)
      Instantiates a new Threshold based retry availability strategy.
      Parameters:
      threshold - the threshold at which the request has to be tried on next region
      thresholdStep - the threshold step at which the request has to be tried on subsequent regions
  • Method Details

    • getThreshold

      public Duration getThreshold()
      Gets threshold.
      Returns:
      the threshold
    • getThresholdStep

      public Duration getThresholdStep()
      Gets threshold step.
      Returns:
      the threshold step
    • toString

      public String toString()
      Overrides:
      toString in class Object