File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
org.springframework.context/src/main/java/org/springframework/scheduling/support Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 26
26
27
27
/**
28
28
* Utility methods for decorating tasks with error handling.
29
+ * <p>
30
+ * <b>NOTE:</b> This class is intended for internal use by Spring's scheduler
31
+ * implementations. It is only public so that it may be accessed from
32
+ * implementations within other packages. It is <i>not</i> intended for general
33
+ * use and may change in the future.
29
34
*
30
35
* @author Mark Fisher
31
36
* @since 3.0
@@ -65,6 +70,12 @@ public static DelegatingErrorHandlingRunnable decorateTaskWithErrorHandler(
65
70
return new DelegatingErrorHandlingRunnable (task , eh );
66
71
}
67
72
73
+ /**
74
+ * Return the default {@link ErrorHandler} implementation based on the boolean
75
+ * value indicating whether the task will be repeating or not. For repeating tasks
76
+ * it will suppress errors, but for one-time tasks it will propagate. In both
77
+ * cases, the error will be logged.
78
+ */
68
79
public static ErrorHandler getDefaultErrorHandler (boolean isRepeatingTask ) {
69
80
return (isRepeatingTask ? LOG_AND_SUPPRESS_ERROR_HANDLER : LOG_AND_PROPAGATE_ERROR_HANDLER );
70
81
}
You can’t perform that action at this time.
0 commit comments