Package org.apache.cassandra.config
Class RetrySpec
- java.lang.Object
-
- org.apache.cassandra.config.RetrySpec
-
- Direct Known Subclasses:
RepairRetrySpec
,RetrySpec.Partial
public class RetrySpec extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RetrySpec.MaxAttempt
static class
RetrySpec.Partial
-
Field Summary
Fields Modifier and Type Field Description DurationSpec.LongMillisecondsBound
baseSleepTime
static DurationSpec.LongMillisecondsBound
DEFAULT_BASE_SLEEP
static RetrySpec.MaxAttempt
DEFAULT_MAX_ATTEMPTS
static DurationSpec.LongMillisecondsBound
DEFAULT_MAX_SLEEP
RetrySpec.MaxAttempt
maxAttempts
Represents how many retry attempts are allowed.DurationSpec.LongMillisecondsBound
maxSleepTime
-
Constructor Summary
Constructors Constructor Description RetrySpec()
RetrySpec(RetrySpec.MaxAttempt maxAttempts, DurationSpec.LongMillisecondsBound baseSleepTime, DurationSpec.LongMillisecondsBound maxSleepTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DurationSpec.LongMillisecondsBound
getBaseSleepTime()
RetrySpec.MaxAttempt
getMaxAttempts()
DurationSpec.LongMillisecondsBound
getMaxSleepTime()
boolean
isEnabled()
void
setEnabled(boolean enabled)
java.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT_MAX_ATTEMPTS
public static final RetrySpec.MaxAttempt DEFAULT_MAX_ATTEMPTS
-
DEFAULT_BASE_SLEEP
public static final DurationSpec.LongMillisecondsBound DEFAULT_BASE_SLEEP
-
DEFAULT_MAX_SLEEP
public static final DurationSpec.LongMillisecondsBound DEFAULT_MAX_SLEEP
-
maxAttempts
public RetrySpec.MaxAttempt maxAttempts
Represents how many retry attempts are allowed. If the value is 2, this will cause 2 retries + 1 original request, for a total of 3 requests! To disable, set to 0.
-
baseSleepTime
public DurationSpec.LongMillisecondsBound baseSleepTime
-
maxSleepTime
public DurationSpec.LongMillisecondsBound maxSleepTime
-
-
Constructor Detail
-
RetrySpec
public RetrySpec()
-
RetrySpec
public RetrySpec(RetrySpec.MaxAttempt maxAttempts, DurationSpec.LongMillisecondsBound baseSleepTime, DurationSpec.LongMillisecondsBound maxSleepTime)
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
getMaxAttempts
@Nullable public RetrySpec.MaxAttempt getMaxAttempts()
-
getBaseSleepTime
@Nullable public DurationSpec.LongMillisecondsBound getBaseSleepTime()
-
getMaxSleepTime
public DurationSpec.LongMillisecondsBound getMaxSleepTime()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-