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 to maxPollInterval
maxPollInterval - upper bound of the exponential backoff
timeout - per-stage timeout; null disables

public record BacktestOptions(Consumer<BacktestProgress> onProgress, Duration pollInterval, Duration maxPollInterval, Duration timeout) extends Record
Tuning knobs for a backtest invocation.
  • Field Details

    • DEFAULT_POLL_INTERVAL

      public static final Duration DEFAULT_POLL_INTERVAL
    • DEFAULT_MAX_POLL_INTERVAL

      public static final Duration DEFAULT_MAX_POLL_INTERVAL
  • Constructor Details

    • BacktestOptions

      public BacktestOptions(Consumer<BacktestProgress> onProgress, Duration pollInterval, Duration maxPollInterval, Duration timeout)
      Creates an instance of a BacktestOptions record class.
      Parameters:
      onProgress - the value for the onProgress record component
      pollInterval - the value for the pollInterval record component
      maxPollInterval - the value for the maxPollInterval record component
      timeout - the value for the timeout record component
  • Method Details

    • defaults

      public static BacktestOptions defaults()
    • builder

      public static BacktestOptions.Builder builder()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • onProgress

      public Consumer<BacktestProgress> onProgress()
      Returns the value of the onProgress record component.
      Returns:
      the value of the onProgress record component
    • pollInterval

      public Duration pollInterval()
      Returns the value of the pollInterval record component.
      Returns:
      the value of the pollInterval record component
    • maxPollInterval

      public Duration maxPollInterval()
      Returns the value of the maxPollInterval record component.
      Returns:
      the value of the maxPollInterval record component
    • timeout

      public Duration timeout()
      Returns the value of the timeout record component.
      Returns:
      the value of the timeout record component