diff --git a/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/annotation/ElasticJobConfiguration.java b/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/annotation/ElasticJobConfiguration.java index 8e4115a8d7..7526c8c38a 100644 --- a/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/annotation/ElasticJobConfiguration.java +++ b/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/annotation/ElasticJobConfiguration.java @@ -17,12 +17,13 @@ package org.apache.shardingsphere.elasticjob.annotation; +import org.apache.shardingsphere.elasticjob.api.JobExtraConfigurationFactory; + import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.apache.shardingsphere.elasticjob.api.JobExtraConfigurationFactory; /** * The annotation that specify a job of elastic. @@ -34,126 +35,147 @@ /** * Job name. - * @return jobName + * + * @return job name */ String jobName(); /** * CRON expression, control the job trigger time. + * * @return cron */ String cron() default ""; /** * Time zone of CRON. - * @return timeZone + * + * @return time zone */ String timeZone() default ""; /** - * registry center name. - * @return registryCenter + * Registry center name. + * + * @return registry center */ String registryCenter() default ""; /** * Sharding total count. - * @return shardingTotalCount + * + * @return sharding total count */ int shardingTotalCount(); /** * Sharding item parameters. - * @return shardingItemParameters + * + * @return sharding item parameters */ String shardingItemParameters() default ""; /** * Job parameter. - * @return jobParameter + * + * @return job parameter */ String jobParameter() default ""; /** * Monitor job execution status. - * @return monitorExecution + * + * @return monitor execution */ boolean monitorExecution() default true; /** * Enable or disable job failover. + * * @return failover */ boolean failover() default false; /** * Enable or disable the missed task to re-execute. + * * @return misfire */ boolean misfire() default true; /** * The maximum value for time difference between server and registry center in seconds. - * @return maxTimeDiffSeconds + * + * @return max time diff seconds */ int maxTimeDiffSeconds() default -1; /** * Service scheduling interval in minutes for repairing job server inconsistent state. - * @return reconcileIntervalMinutes + * + * @return reconcile interval minutes */ int reconcileIntervalMinutes() default 10; /** * Job sharding strategy type. - * @return jobShardingStrategyType + * + * @return job sharding strategy type */ String jobShardingStrategyType() default ""; /** * Job thread pool handler type. - * @return jobExecutorServiceHandlerType + * + * @return job executor service handler type */ String jobExecutorServiceHandlerType() default ""; /** * Job thread pool handler type. - * @return jobErrorHandlerType + * + * @return job error handler type */ String jobErrorHandlerType() default ""; /** * Job listener types. - * @return jobListenerTypes + * + * @return job listener types */ String[] jobListenerTypes() default {}; /** - * extra configurations. - * @return extraConfigurations + * Extra configurations. + * + * @return extra configurations */ Class[] extraConfigurations() default {}; /** * Job description. + * * @return description */ String description() default ""; /** * Job properties. - * @return props + * + * @return properties */ ElasticJobProp[] props() default {}; /** * Enable or disable start the job. + * * @return disabled */ boolean disabled() default false; /** * Enable or disable local configuration override registry center configuration. + * * @return overwrite */ boolean overwrite() default false; diff --git a/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/annotation/ElasticJobProp.java b/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/annotation/ElasticJobProp.java index aa0d7904e4..099154415b 100644 --- a/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/annotation/ElasticJobProp.java +++ b/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/annotation/ElasticJobProp.java @@ -30,12 +30,14 @@ /** * Prop key. + * * @return key */ String key(); /** * Prop value. + * * @return value */ String value() default ""; diff --git a/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/api/JobExtraConfigurationFactory.java b/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/api/JobExtraConfigurationFactory.java index b6cbfa15f7..fa595f863d 100644 --- a/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/api/JobExtraConfigurationFactory.java +++ b/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/api/JobExtraConfigurationFactory.java @@ -25,8 +25,9 @@ public interface JobExtraConfigurationFactory { /** - * Get JobExtraConfiguration. - * @return JobExtraConfiguration + * Get job extra configuration. + * + * @return job extra configuration */ Optional getJobExtraConfiguration(); }