Package markets.alpaca.client.http
Record Class AlpacaRetryEvent
java.lang.Object
java.lang.Record
markets.alpaca.client.http.AlpacaRetryEvent
public record AlpacaRetryEvent(String method, okhttp3.HttpUrl url, int statusCode, int attempt, int maxAttempts, Duration delay)
extends Record
Describes one retry decision made by
AlpacaRetryInterceptor.-
Constructor Summary
ConstructorsConstructorDescriptionAlpacaRetryEvent(String method, okhttp3.HttpUrl url, int statusCode, int attempt, int maxAttempts, Duration delay) Creates an instance of aAlpacaRetryEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintattempt()Returns the value of theattemptrecord component.delay()Returns the value of thedelayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxAttemptsrecord component.method()Returns the value of themethodrecord component.intReturns the value of thestatusCoderecord component.final StringtoString()Returns a string representation of this record class.okhttp3.HttpUrlurl()Returns the value of theurlrecord component.
-
Constructor Details
-
AlpacaRetryEvent
public AlpacaRetryEvent(String method, okhttp3.HttpUrl url, int statusCode, int attempt, int maxAttempts, Duration delay) Creates an instance of aAlpacaRetryEventrecord class.- Parameters:
method- the value for themethodrecord componenturl- the value for theurlrecord componentstatusCode- the value for thestatusCoderecord componentattempt- the value for theattemptrecord componentmaxAttempts- the value for themaxAttemptsrecord componentdelay- the value for thedelayrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
url
public okhttp3.HttpUrl url()Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
statusCode
public int statusCode()Returns the value of thestatusCoderecord component.- Returns:
- the value of the
statusCoderecord component
-
attempt
public int attempt()Returns the value of theattemptrecord component.- Returns:
- the value of the
attemptrecord component
-
maxAttempts
public int maxAttempts()Returns the value of themaxAttemptsrecord component.- Returns:
- the value of the
maxAttemptsrecord component
-
delay
Returns the value of thedelayrecord component.- Returns:
- the value of the
delayrecord component
-