Package com.qtsurfer.api.sdk
Record Class SweepOptions
java.lang.Object
java.lang.Record
com.qtsurfer.api.sdk.SweepOptions
- Record Components:
onProgress- callback fired on stage transitions and after each poll (nullable)pollInterval- initial interval between status polls; the SDK backs off exponentially up tomaxPollIntervalmaxPollInterval- upper bound of the exponential backofftimeout- per-stage timeout;nulldisables. A sweep is many backtests, so the execute stage legitimately outlasts anything a single run would takeranking- how to order the leaderboard the poll reads.nullsends no preference and takes the platform default, which isSweepRanking.PLATEAU— so leaving this unset does not give you raw objective order. What was actually applied is reported on the result; seeSweepRanking. Ignored entirely whenorderisSweepOrder.NATURAL, which is always ordered byrunIxorder- which view of the rows to read.nulltakes the platform default,SweepOrder.RANKED— the sorted, display-capped leaderboard.SweepOrder.NATURALreturns every available row untruncated, and is the only way to reach rows the ranked view dropped when the result reportstruncated
public record SweepOptions(Consumer<SweepProgressEvent> onProgress, Duration pollInterval, Duration maxPollInterval, Duration timeout, SweepRanking ranking, SweepOrder order)
extends Record
Tuning knobs for a
sweep
invocation.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSweepOptions(Consumer<SweepProgressEvent> onProgress, Duration pollInterval, Duration maxPollInterval, Duration timeout, SweepRanking ranking, SweepOrder order) Fills in the default poll intervals when either is leftnull. -
Method Summary
Modifier and TypeMethodDescriptionstatic SweepOptions.Builderbuilder()Start building options.static SweepOptionsdefaults()Defaults: no progress callback, no stage timeout, and whatever ordering the platform defaults to.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.order()Returns the value of theorderrecord component.Returns the value of thepollIntervalrecord component.ranking()Returns the value of therankingrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_POLL_INTERVAL
Initial interval between polls when none is configured. -
DEFAULT_MAX_POLL_INTERVAL
Upper bound of the exponential backoff when none is configured.
-
-
Constructor Details
-
SweepOptions
public SweepOptions(Consumer<SweepProgressEvent> onProgress, Duration pollInterval, Duration maxPollInterval, Duration timeout, SweepRanking ranking, SweepOrder order) Fills in the default poll intervals when either is leftnull.
-
-
Method Details
-
defaults
Defaults: no progress callback, no stage timeout, and whatever ordering the platform defaults to.The poll intervals are longer than a single backtest's, because a sweep is many backtests and its leaderboard changes on the timescale of shards finishing rather than ticks.
- Returns:
- the default options
-
builder
Start building options.- Returns:
- a fresh 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
-
ranking
Returns the value of therankingrecord component.- Returns:
- the value of the
rankingrecord component
-
order
Returns the value of theorderrecord component.- Returns:
- the value of the
orderrecord component
-