Skip to content

Commit 76122c9

Browse files
committed
updated javadoc
1 parent 22e1305 commit 76122c9

File tree

1 file changed

+11
-0
lines changed
  • org.springframework.context/src/main/java/org/springframework/scheduling/support

1 file changed

+11
-0
lines changed

org.springframework.context/src/main/java/org/springframework/scheduling/support/TaskUtils.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626

2727
/**
2828
* 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.
2934
*
3035
* @author Mark Fisher
3136
* @since 3.0
@@ -65,6 +70,12 @@ public static DelegatingErrorHandlingRunnable decorateTaskWithErrorHandler(
6570
return new DelegatingErrorHandlingRunnable(task, eh);
6671
}
6772

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+
*/
6879
public static ErrorHandler getDefaultErrorHandler(boolean isRepeatingTask) {
6980
return (isRepeatingTask ? LOG_AND_SUPPRESS_ERROR_HANDLER : LOG_AND_PROPAGATE_ERROR_HANDLER);
7081
}

0 commit comments

Comments
 (0)