Class SafeRun
- java.lang.Object
-
- org.apache.bookkeeper.mledger.util.SafeRun
-
public class SafeRun extends java.lang.ObjectStatic builders forSafeRunnables.
-
-
Constructor Summary
Constructors Constructor Description SafeRun()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.bookkeeper.util.SafeRunnablesafeRun(java.lang.Runnable runnable)static org.apache.bookkeeper.util.SafeRunnablesafeRun(java.lang.Runnable runnable, java.util.function.Consumer<java.lang.Throwable> exceptionHandler)
-
-
-
Method Detail
-
safeRun
public static org.apache.bookkeeper.util.SafeRunnable safeRun(java.lang.Runnable runnable)
-
safeRun
public static org.apache.bookkeeper.util.SafeRunnable safeRun(java.lang.Runnable runnable, java.util.function.Consumer<java.lang.Throwable> exceptionHandler)- Parameters:
runnable-exceptionHandler- handler that will be called when there are any exception- Returns:
-
-