Skip to content

Commit

Permalink
Add RequestAttempt.maxRetries back (#1640)
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinbunney authored Sep 14, 2023
1 parent 1f06d0f commit 3691b1f
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ public class RequestAttempt
private String availabilityZone;
private long readTimeout;
private int connectTimeout;
private int maxRetries;

public RequestAttempt(int attemptNumber, InstanceInfo server, String targetVip, String chosenWarmupLB, int status, String error, String exceptionType,
int readTimeout, int connectTimeout)
int readTimeout, int connectTimeout, int maxRetries)
{
if (attemptNumber < 1) {
throw new IllegalArgumentException("Attempt number must be greater than 0! - " + attemptNumber);
Expand Down Expand Up @@ -95,6 +96,7 @@ public RequestAttempt(int attemptNumber, InstanceInfo server, String targetVip,
this.exceptionType = exceptionType;
this.readTimeout = readTimeout;
this.connectTimeout = connectTimeout;
this.maxRetries = maxRetries;
}

public RequestAttempt(final DiscoveryResult server, final IClientConfig clientConfig, int attemptNumber, int readTimeout) {
Expand Down Expand Up @@ -217,6 +219,11 @@ public int getConnectTimeout()
return connectTimeout;
}

public int getMaxRetries()
{
return maxRetries;
}

public void setStatus(int status)
{
this.status = status;
Expand Down Expand Up @@ -323,6 +330,11 @@ else if (t instanceof SSLHandshakeException) {
}
}

public void setMaxRetries(int maxRetries)
{
this.maxRetries = maxRetries;
}

@Override
public String toString()
{
Expand Down

0 comments on commit 3691b1f

Please sign in to comment.