summaryrefslogtreecommitdiff
path: root/spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java
diff options
context:
space:
mode:
Diffstat (limited to 'spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java')
-rw-r--r--spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java28
1 files changed, 17 insertions, 11 deletions
diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java
index d46c7386..045dcd8a 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,18 +24,22 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * Annotation that marks a method to be scheduled. Exactly one of the
- * {@link #cron()}, {@link #fixedDelay()}, or {@link #fixedRate()}
+ * An annotation that marks a method to be scheduled. Exactly one of
+ * the {@link #cron()}, {@link #fixedDelay()}, or {@link #fixedRate()}
* attributes must be specified.
*
- * <p>The annotated method must expect no arguments and have a
- * {@code void} return type.
+ * <p>The annotated method must expect no arguments. It will typically have
+ * a {@code void} return type; if not, the returned value will be ignored
+ * when called through the scheduler.
*
* <p>Processing of {@code @Scheduled} annotations is performed by
* registering a {@link ScheduledAnnotationBeanPostProcessor}. This can be
* done manually or, more conveniently, through the {@code <task:annotation-driven/>}
* element or @{@link EnableScheduling} annotation.
*
+ * <p>This annotation may be used as a <em>meta-annotation</em> to create custom
+ * <em>composed annotations</em> with attribute overrides.
+ *
* @author Mark Fisher
* @author Dave Syer
* @author Chris Beams
@@ -72,28 +76,30 @@ public @interface Scheduled {
String zone() default "";
/**
- * Execute the annotated method with a fixed period between the end
- * of the last invocation and the start of the next.
+ * Execute the annotated method with a fixed period in milliseconds between the
+ * end of the last invocation and the start of the next.
* @return the delay in milliseconds
*/
long fixedDelay() default -1;
/**
- * Execute the annotated method with a fixed period between the end
- * of the last invocation and the start of the next.
+ * Execute the annotated method with a fixed period in milliseconds between the
+ * end of the last invocation and the start of the next.
* @return the delay in milliseconds as a String value, e.g. a placeholder
* @since 3.2.2
*/
String fixedDelayString() default "";
/**
- * Execute the annotated method with a fixed period between invocations.
+ * Execute the annotated method with a fixed period in milliseconds between
+ * invocations.
* @return the period in milliseconds
*/
long fixedRate() default -1;
/**
- * Execute the annotated method with a fixed period between invocations.
+ * Execute the annotated method with a fixed period in milliseconds between
+ * invocations.
* @return the period in milliseconds as a String value, e.g. a placeholder
* @since 3.2.2
*/