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 void
run()
The work method.static Runnable
unchecked(ThrowingRunnable<?> throwingRunnable)
Converts aThrowingRunnable
into aRunnable
which throws all checked exceptions as unchecked.
-
-
-
Method Detail
-
unchecked
static Runnable unchecked(ThrowingRunnable<?> throwingRunnable)
Converts aThrowingRunnable
into aRunnable
which throws all checked exceptions as unchecked.
-
-