Record Class GrpcRetry.RetryPolicy
java.lang.Object
java.lang.Record
ai.pipestream.module.pipelineprobe.pipelinecrawl.GrpcRetry.RetryPolicy
- Record Components:
maxRetries- number of retries AFTER the initial attempt (e.g., maxRetries=2 → up to 3 total calls)baseBackoffMs- delay before the first retry
- Enclosing class:
GrpcRetry
Retry budget for a single op. Exponential backoff: attempt 0 uses
baseBackoffMs, attempt N uses baseBackoffMs * 2^N.-
Constructor Summary
ConstructorsConstructorDescriptionRetryPolicy(int maxRetries, long baseBackoffMs) Creates an instance of aRetryPolicyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongbackoffMs(int attempt) Computes the backoff delay before the given 0-based retry attempt, doublingbaseBackoffMsfor each successive attempt.longReturns the value of thebaseBackoffMsrecord component.static GrpcRetry.RetryPolicyStandard policy for sidecar control-plane setup calls (account, datasource, graph bind, config registration).final 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.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RetryPolicy
public RetryPolicy(int maxRetries, long baseBackoffMs) Creates an instance of aRetryPolicyrecord class.- Parameters:
maxRetries- the value for themaxRetriesrecord componentbaseBackoffMs- the value for thebaseBackoffMsrecord component
-
-
Method Details
-
backoffMs
public long backoffMs(int attempt) Computes the backoff delay before the given 0-based retry attempt, doublingbaseBackoffMsfor each successive attempt.- Parameters:
attempt- the 0-based attempt index- Returns:
- the backoff delay in milliseconds for that attempt
-
controlPlane
Standard policy for sidecar control-plane setup calls (account, datasource, graph bind, config registration). 3 total attempts, 200ms → 400ms backoff. Total worst-case retry-time ~600ms on top of whatever per-attempt deadline the caller supplies.- Returns:
- the standard control-plane retry policy (2 retries, 200ms base backoff)
-
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. All components in this record class 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
-
baseBackoffMs
public long baseBackoffMs()Returns the value of thebaseBackoffMsrecord component.- Returns:
- the value of the
baseBackoffMsrecord component
-