Record Class ProviderOptions
java.lang.Object
java.lang.Record
ai.doctruth.ProviderOptions
- Record Components:
maxRetries- number of retry attempts on retryable failures (0 = first call only).timeout- per-call wall-clock timeout; passed verbatim to the JDK HTTP layer.
Per-call knobs passed to an
LlmProvider on every request.
Invariants (compact constructor):
maxRetries >= 0.timeoutnon-null and strictly positive (Duration.ZEROand any negative duration reject — a non-positive timeout is meaningless).
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionProviderOptions(int maxRetries, Duration timeout) Creates an instance of aProviderOptionsrecord class. -
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.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ProviderOptions
Creates an instance of aProviderOptionsrecord class.- Parameters:
maxRetries- the value for themaxRetriesrecord componenttimeout- the value for thetimeoutrecord component
-
-
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
-
timeout
-