Package com.qtsurfer.api.sdk
Record Class BacktestOptions
java.lang.Object
java.lang.Record
com.qtsurfer.api.sdk.BacktestOptions
- Record Components:
onProgress- callback fired on stage transitions and after each poll with size info (nullable)pollInterval- initial interval between status polls; the SDK backs off exponentially up tomaxPollIntervalmaxPollInterval- upper bound of the exponential backofftimeout- per-stage timeout;nulldisables
public record BacktestOptions(Consumer<BacktestProgress> onProgress, Duration pollInterval, Duration maxPollInterval, Duration timeout)
extends Record
Tuning knobs for a
backtest invocation.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBacktestOptions(Consumer<BacktestProgress> onProgress, Duration pollInterval, Duration maxPollInterval, Duration timeout) Creates an instance of aBacktestOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BacktestOptions.Builderbuilder()static BacktestOptionsdefaults()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaxPollIntervalrecord component.Returns the value of theonProgressrecord component.Returns the value of thepollIntervalrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_POLL_INTERVAL
-
DEFAULT_MAX_POLL_INTERVAL
-
-
Constructor Details
-
BacktestOptions
public BacktestOptions(Consumer<BacktestProgress> onProgress, Duration pollInterval, Duration maxPollInterval, Duration timeout) Creates an instance of aBacktestOptionsrecord class.- Parameters:
onProgress- the value for theonProgressrecord componentpollInterval- the value for thepollIntervalrecord componentmaxPollInterval- the value for themaxPollIntervalrecord componenttimeout- the value for thetimeoutrecord component
-
-
Method Details
-
defaults
-
builder
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
onProgress
Returns the value of theonProgressrecord component.- Returns:
- the value of the
onProgressrecord component
-
pollInterval
Returns the value of thepollIntervalrecord component.- Returns:
- the value of the
pollIntervalrecord component
-
maxPollInterval
Returns the value of themaxPollIntervalrecord component.- Returns:
- the value of the
maxPollIntervalrecord component
-
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-