public class ResultRetryStrategy extends Object implements org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy<org.apache.flink.table.data.RowData>
AsyncRetryStrategy to support both sync and
async retry in table module. The main consideration is making the class name not bind to async
scope, and also highlight the retry predicate is only over the result (not exception).| Modifier and Type | Field and Description |
|---|---|
static ResultRetryStrategy |
NO_RETRY_STRATEGY |
| Constructor and Description |
|---|
ResultRetryStrategy(org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy retryStrategy) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRetry(int currentAttempts) |
static ResultRetryStrategy |
fixedDelayRetry(int maxAttempts,
long backoffTimeMillis,
Predicate<Collection<org.apache.flink.table.data.RowData>> resultPredicate)
Create a fixed-delay retry strategy by given params.
|
long |
getBackoffTimeMillis(int currentAttempts) |
org.apache.flink.streaming.api.functions.async.AsyncRetryPredicate<org.apache.flink.table.data.RowData> |
getRetryPredicate() |
public static final ResultRetryStrategy NO_RETRY_STRATEGY
@VisibleForTesting public ResultRetryStrategy(org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy retryStrategy)
public static ResultRetryStrategy fixedDelayRetry(int maxAttempts, long backoffTimeMillis, Predicate<Collection<org.apache.flink.table.data.RowData>> resultPredicate)
public boolean canRetry(int currentAttempts)
canRetry in interface org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy<org.apache.flink.table.data.RowData>public long getBackoffTimeMillis(int currentAttempts)
getBackoffTimeMillis in interface org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy<org.apache.flink.table.data.RowData>public org.apache.flink.streaming.api.functions.async.AsyncRetryPredicate<org.apache.flink.table.data.RowData> getRetryPredicate()
getRetryPredicate in interface org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy<org.apache.flink.table.data.RowData>Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.