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).| 限定符和类型 | 字段和说明 |
|---|---|
static ResultRetryStrategy |
NO_RETRY_STRATEGY |
| 构造器和说明 |
|---|
ResultRetryStrategy(org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy retryStrategy) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy<org.apache.flink.table.data.RowData>public long getBackoffTimeMillis(int currentAttempts)
getBackoffTimeMillis 在接口中 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 在接口中 org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy<org.apache.flink.table.data.RowData>Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.