Class AlwaysSpeculativeRetryPolicy
- java.lang.Object
-
- org.apache.cassandra.service.reads.AlwaysSpeculativeRetryPolicy
-
- All Implemented Interfaces:
SpeculativeRetryPolicy
public class AlwaysSpeculativeRetryPolicy extends java.lang.Object implements SpeculativeRetryPolicy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.service.reads.SpeculativeRetryPolicy
SpeculativeRetryPolicy.Kind
-
-
Field Summary
Fields Modifier and Type Field Description static AlwaysSpeculativeRetryPolicy
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
calculateThreshold(SnapshottingTimer latency, long existingValue)
Calculate the delay in microseconds after which speculation takes placeboolean
equals(java.lang.Object obj)
int
hashCode()
SpeculativeRetryPolicy.Kind
kind()
java.lang.String
toString()
-
-
-
Field Detail
-
INSTANCE
public static final AlwaysSpeculativeRetryPolicy INSTANCE
-
-
Method Detail
-
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 interfaceSpeculativeRetryPolicy
- Parameters:
latency
- snapshot of coordinator latencies (in microseconds)existingValue
- existing speculation threshold (in microseconds)- Returns:
- speculation delay (in microseconds).
-
kind
public SpeculativeRetryPolicy.Kind kind()
- Specified by:
kind
in interfaceSpeculativeRetryPolicy
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-