public class NonThrownExecutor extends Object implements AutoCloseable
A post-exception hook NonThrownExecutor.ExceptionHook can be defined on construction
or on each execution.
| Modifier and Type | Class and Description |
|---|---|
static class |
NonThrownExecutor.Builder
Builder for
NonThrownExecutor. |
static interface |
NonThrownExecutor.ExceptionHook
The exception hook.
|
| Modifier and Type | Field and Description |
|---|---|
protected NonThrownExecutor.ExceptionHook |
exceptionHook
Exception hook for post-exception handling.
|
| Modifier | Constructor and Description |
|---|---|
protected |
NonThrownExecutor(org.slf4j.Logger logger,
NonThrownExecutor.ExceptionHook exceptionHook,
boolean waitForTasksFinish) |
| Modifier and Type | Method and Description |
|---|---|
static NonThrownExecutor.Builder |
builder(org.slf4j.Logger logger) |
void |
close() |
void |
execute(org.apache.flink.util.function.ThrowingRunnable<Throwable> action,
NonThrownExecutor.ExceptionHook hook,
String actionName,
Object... actionParams)
Run the action in a loop.
|
void |
execute(org.apache.flink.util.function.ThrowingRunnable<Throwable> action,
String actionName,
Object... actionParams)
Run the action in a loop.
|
void |
executeSync(org.apache.flink.util.function.ThrowingRunnable<Throwable> action,
String actionName,
Object... actionParams)
Run the action in a loop and wait for completion.
|
@VisibleForTesting protected final NonThrownExecutor.ExceptionHook exceptionHook
@VisibleForTesting
protected NonThrownExecutor(org.slf4j.Logger logger,
@Nullable
NonThrownExecutor.ExceptionHook exceptionHook,
boolean waitForTasksFinish)
public static NonThrownExecutor.Builder builder(org.slf4j.Logger logger)
public void execute(org.apache.flink.util.function.ThrowingRunnable<Throwable> action, String actionName, Object... actionParams)
public void execute(org.apache.flink.util.function.ThrowingRunnable<Throwable> action, NonThrownExecutor.ExceptionHook hook, String actionName, Object... actionParams)
public void executeSync(org.apache.flink.util.function.ThrowingRunnable<Throwable> action, String actionName, Object... actionParams)
public void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.