mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 01:01:15 +01:00
Retry Redis commands that time out.
This commit is contained in:
committed by
Jon Chambers
parent
2d42b478ba
commit
76665dd56e
@@ -23,6 +23,11 @@ public class RedisClusterConfiguration {
|
||||
@Valid
|
||||
private CircuitBreakerConfiguration circuitBreaker = new CircuitBreakerConfiguration();
|
||||
|
||||
@JsonProperty
|
||||
@NotNull
|
||||
@Valid
|
||||
private RetryConfiguration retry = new RetryConfiguration();
|
||||
|
||||
public List<String> getUrls() {
|
||||
return urls;
|
||||
}
|
||||
@@ -34,4 +39,8 @@ public class RedisClusterConfiguration {
|
||||
public CircuitBreakerConfiguration getCircuitBreakerConfiguration() {
|
||||
return circuitBreaker;
|
||||
}
|
||||
|
||||
public RetryConfiguration getRetryConfiguration() {
|
||||
return retry;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,10 +22,18 @@ public class RetryConfiguration {
|
||||
return maxAttempts;
|
||||
}
|
||||
|
||||
public void setMaxAttempts(final int maxAttempts) {
|
||||
this.maxAttempts = maxAttempts;
|
||||
}
|
||||
|
||||
public long getWaitDuration() {
|
||||
return waitDuration;
|
||||
}
|
||||
|
||||
public void setWaitDuration(final long waitDuration) {
|
||||
this.waitDuration = waitDuration;
|
||||
}
|
||||
|
||||
public RetryConfig toRetryConfig() {
|
||||
return toRetryConfigBuilder().build();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user