Record Class HttpFileSystemProviderSettings.RetrySettings
java.lang.Object
java.lang.Record
org.broadinstitute.http.nio.HttpFileSystemProviderSettings.RetrySettings
- Enclosing class:
HttpFileSystemProviderSettings
public static record HttpFileSystemProviderSettings.RetrySettings(int maxRetries, Collection<Integer> retryableHttpCodes, Collection<Class<? extends Exception>> retryableExceptions, Collection<String> retryableMessages, Predicate<Throwable> retryPredicate)
extends Record
Settings which control the behavior of http retries
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for themaxRetriesrecord component.private final Collection<Class<? extends Exception>> The field for theretryableExceptionsrecord component.private final Collection<Integer> The field for theretryableHttpCodesrecord component.private final Collection<String> The field for theretryableMessagesrecord component.The field for theretryPredicaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRetrySettings(int maxRetries, Collection<Integer> retryableHttpCodes, Collection<Class<? extends Exception>> retryableExceptions, Collection<String> retryableMessages, Predicate<Throwable> retryPredicate) Settings to control retry behavior -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxRetriesrecord component.Collection<Class<? extends Exception>> Returns the value of theretryableExceptionsrecord component.Returns the value of theretryableHttpCodesrecord component.Returns the value of theretryableMessagesrecord component.Returns the value of theretryPredicaterecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
maxRetries
private final int maxRetriesThe field for themaxRetriesrecord component. -
retryableHttpCodes
The field for theretryableHttpCodesrecord component. -
retryableExceptions
The field for theretryableExceptionsrecord component. -
retryableMessages
The field for theretryableMessagesrecord component. -
retryPredicate
-
-
Constructor Details
-
RetrySettings
public RetrySettings(int maxRetries, Collection<Integer> retryableHttpCodes, Collection<Class<? extends Exception>> retryableExceptions, Collection<String> retryableMessages, Predicate<Throwable> retryPredicate) Settings to control retry behavior- Parameters:
maxRetries- number of times to retry an attempted network operation, must be >= 0retryableHttpCodes- a list of http response codes which will be retried when encounteredretryableExceptions- a list of exception classes which will be retried when encounteredretryableMessages- a list of messages which will be retried when found in an exception messageretryPredicate- an arbitrary predicate which allows handling retries in custom ways, applied after testing response codes and retryable exceptions, if it returns true it will be retried
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
maxRetries
public int maxRetries()Returns the value of themaxRetriesrecord component.- Returns:
- the value of the
maxRetriesrecord component
-
retryableHttpCodes
Returns the value of theretryableHttpCodesrecord component.- Returns:
- the value of the
retryableHttpCodesrecord component
-
retryableExceptions
Returns the value of theretryableExceptionsrecord component.- Returns:
- the value of the
retryableExceptionsrecord component
-
retryableMessages
Returns the value of theretryableMessagesrecord component.- Returns:
- the value of the
retryableMessagesrecord component
-
retryPredicate
-