Class PercentileSpeculativeRetryPolicy

java.lang.Object
org.apache.cassandra.service.reads.PercentileSpeculativeRetryPolicy
All Implemented Interfaces:
SpeculativeRetryPolicy

public class PercentileSpeculativeRetryPolicy extends Object implements SpeculativeRetryPolicy
  • Field Details

  • Constructor Details

    • PercentileSpeculativeRetryPolicy

      public PercentileSpeculativeRetryPolicy(double percentile)
  • Method Details

    • calculateThreshold

      public long calculateThreshold(SnapshottingTimer latency, long existingValue)
      Description copied from interface: SpeculativeRetryPolicy
      Calculate the delay in microseconds after which speculation takes place
      Specified by:
      calculateThreshold in interface SpeculativeRetryPolicy
      Parameters:
      latency - snapshot of coordinator latencies (in microseconds)
      existingValue - existing speculation threshold (in microseconds)
      Returns:
      speculation delay (in microseconds).
    • calculateThreshold

      public long calculateThreshold(com.codahale.metrics.Snapshot snapshot, long existingValue)
    • kind

      Specified by:
      kind in interface SpeculativeRetryPolicy
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object