Record Class WaitForTraceOptions
java.lang.Object
java.lang.Record
codes.grow.packages.datadogapm.tracing.query.WaitForTraceOptions
- Record Components:
timeout- overall wait (default 30 s)interval- delay between attempts (default 1 s)minSpans- spans the trace must have (default 1)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWaitForTraceOptions(Duration timeout, Duration interval, int minSpans) Fills defaults fornulldurations. -
Method Summary
Modifier and TypeMethodDescriptionstatic WaitForTraceOptionsdefaults()Defaults: 30 s, 1 s, 1 span.final booleanIndicates whether some other object is "equal to" this one.Returns the interval the caller set, or empty when it was left unset (the record then holdsDEFAULT_INTERVAL).final inthashCode()Returns a hash code value for this object.interval()Returns the value of theintervalrecord component.intervalOr(Duration serviceDefault) Returns the caller's interval, orserviceDefaultwhen it was left unset.intminSpans()Returns the value of theminSpansrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_INTERVAL
The interval used when none is given.explicitInterval()tells this default apart from an interval the caller chose, so a service can apply its own default (passing this constant itself counts as unset).
-
-
Constructor Details
-
WaitForTraceOptions
Fills defaults fornulldurations.- Parameters:
timeout- overall waitinterval- delay between attemptsminSpans- minimum spans
-
-
Method Details
-
defaults
Defaults: 30 s, 1 s, 1 span.- Returns:
- defaults
-
explicitInterval
Returns the interval the caller set, or empty when it was left unset (the record then holdsDEFAULT_INTERVAL).- Returns:
- the explicit interval, if any
-
intervalOr
Returns the caller's interval, orserviceDefaultwhen it was left unset.- Parameters:
serviceDefault- the service's own default interval- Returns:
- the interval to use
-
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 '=='. -
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
interval
Returns the value of theintervalrecord component.- Returns:
- the value of the
intervalrecord component
-
minSpans
public int minSpans()Returns the value of theminSpansrecord component.- Returns:
- the value of the
minSpansrecord component
-