Package org.onlab.util
Class SafeRecurringTask
- java.lang.Object
-
- org.onlab.util.SafeRecurringTask
-
- All Implemented Interfaces:
java.lang.Runnable
public final class SafeRecurringTask extends java.lang.Object implements java.lang.Runnable
Wrapper for a recurring task which catches all exceptions to prevent task being suppressed in a ScheduledExecutorService.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
static SafeRecurringTask
wrap(java.lang.Runnable runnable)
Wraps a runnable in a safe recurring task.
-
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
wrap
public static SafeRecurringTask wrap(java.lang.Runnable runnable)
Wraps a runnable in a safe recurring task.- Parameters:
runnable
- runnable to wrap- Returns:
- safe recurring task
-
-