Package org.apache.flink.util.function
Interface ThrowingRunnable<E extends Throwable>
-
- All Known Subinterfaces:
RunnableWithException
- All Known Implementing Classes:
FutureTaskWithException
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@PublicEvolving @FunctionalInterface public interface ThrowingRunnable<E extends Throwable>
Similar to aRunnable, this interface is used to capture a block of code to be executed. In contrast toRunnable, this interface allows throwing checked exceptions.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrun()The work method.static Runnableunchecked(ThrowingRunnable<?> throwingRunnable)Converts aThrowingRunnableinto aRunnablewhich throws all checked exceptions as unchecked.
-
-
-
Method Detail
-
unchecked
static Runnable unchecked(ThrowingRunnable<?> throwingRunnable)
Converts aThrowingRunnableinto aRunnablewhich throws all checked exceptions as unchecked.
-
-