1
1
/*
2
- * Copyright 2002-2009 the original author or authors.
2
+ * Copyright 2002-2010 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -59,6 +59,7 @@ public interface TaskScheduler {
59
59
* or <code>null</code> if the given Trigger object never fires (i.e. returns
60
60
* <code>null</code> from {@link Trigger#nextExecutionTime})
61
61
* @throws org.springframework.core.task.TaskRejectedException if the given task was not accepted
62
+ * for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
62
63
* @see org.springframework.scheduling.support.CronTrigger
63
64
*/
64
65
ScheduledFuture schedule (Runnable task , Trigger trigger );
@@ -69,8 +70,10 @@ public interface TaskScheduler {
69
70
* {@link ScheduledFuture} gets cancelled.
70
71
* @param task the Runnable to execute whenever the trigger fires
71
72
* @param startTime the desired execution time for the task
73
+ * (if this is in the past, the task will be executed immediately, i.e. as soon as possible)
72
74
* @return a {@link ScheduledFuture} representing pending completion of the task
73
75
* @throws org.springframework.core.task.TaskRejectedException if the given task was not accepted
76
+ * for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
74
77
*/
75
78
ScheduledFuture schedule (Runnable task , Date startTime );
76
79
@@ -81,9 +84,11 @@ public interface TaskScheduler {
81
84
* {@link ScheduledFuture} gets cancelled.
82
85
* @param task the Runnable to execute whenever the trigger fires
83
86
* @param startTime the desired first execution time for the task
84
- * @param period the interval between successive executions of the task
87
+ * (if this is in the past, the task will be executed immediately, i.e. as soon as possible)
88
+ * @param period the interval between successive executions of the task (in milliseconds)
85
89
* @return a {@link ScheduledFuture} representing pending completion of the task
86
90
* @throws org.springframework.core.task.TaskRejectedException if the given task was not accepted
91
+ * for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
87
92
*/
88
93
ScheduledFuture scheduleAtFixedRate (Runnable task , Date startTime , long period );
89
94
@@ -93,9 +98,10 @@ public interface TaskScheduler {
93
98
* <p>Execution will end once the scheduler shuts down or the returned
94
99
* {@link ScheduledFuture} gets cancelled.
95
100
* @param task the Runnable to execute whenever the trigger fires
96
- * @param period the interval between successive executions of the task
101
+ * @param period the interval between successive executions of the task (in milliseconds)
97
102
* @return a {@link ScheduledFuture} representing pending completion of the task
98
103
* @throws org.springframework.core.task.TaskRejectedException if the given task was not accepted
104
+ * for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
99
105
*/
100
106
ScheduledFuture scheduleAtFixedRate (Runnable task , long period );
101
107
@@ -107,10 +113,12 @@ public interface TaskScheduler {
107
113
* {@link ScheduledFuture} gets cancelled.
108
114
* @param task the Runnable to execute whenever the trigger fires
109
115
* @param startTime the desired first execution time for the task
116
+ * (if this is in the past, the task will be executed immediately, i.e. as soon as possible)
110
117
* @param delay the delay between the completion of one execution and the start
111
- * of the next
118
+ * of the next (in milliseconds)
112
119
* @return a {@link ScheduledFuture} representing pending completion of the task
113
120
* @throws org.springframework.core.task.TaskRejectedException if the given task was not accepted
121
+ * for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
114
122
*/
115
123
ScheduledFuture scheduleWithFixedDelay (Runnable task , Date startTime , long delay );
116
124
@@ -121,9 +129,10 @@ public interface TaskScheduler {
121
129
* <p>Execution will end once the scheduler shuts down or the returned
122
130
* {@link ScheduledFuture} gets cancelled.
123
131
* @param task the Runnable to execute whenever the trigger fires
124
- * @param delay the interval between successive executions of the task
132
+ * @param delay the interval between successive executions of the task (in milliseconds)
125
133
* @return a {@link ScheduledFuture} representing pending completion of the task
126
134
* @throws org.springframework.core.task.TaskRejectedException if the given task was not accepted
135
+ * for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
127
136
*/
128
137
ScheduledFuture scheduleWithFixedDelay (Runnable task , long delay );
129
138
0 commit comments