Coverage Report - org.apache.onami.scheduler.Scheduled
 
Classes in this File Line Coverage Branch Coverage Complexity
Scheduled
N/A
N/A
0
 
 1  
 package org.apache.onami.scheduler;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *   http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import static org.quartz.utils.Key.DEFAULT_GROUP;
 23  
 
 24  
 import java.lang.annotation.Documented;
 25  
 import java.lang.annotation.ElementType;
 26  
 import java.lang.annotation.Inherited;
 27  
 import java.lang.annotation.Retention;
 28  
 import java.lang.annotation.RetentionPolicy;
 29  
 import java.lang.annotation.Target;
 30  
 
 31  
 /**
 32  
  * {@code Job} classes annotated with {@code Scheduled} will be automatically scheduled.
 33  
  */
 34  
 @Inherited
 35  
 @Documented
 36  
 @Retention(RetentionPolicy.RUNTIME)
 37  
 @Target(ElementType.TYPE)
 38  
 public @interface Scheduled
 39  
 {
 40  
 
 41  
     public static final String DEFAULT = "##default";
 42  
 
 43  
     // Job
 44  
 
 45  
     /**
 46  
      * The {@code Job} name, must be unique within the group.
 47  
      */
 48  
     String jobName() default DEFAULT;
 49  
 
 50  
     /**
 51  
      * The {@code Job} group.
 52  
      */
 53  
     String jobGroup() default DEFAULT_GROUP;
 54  
 
 55  
     /**
 56  
      * Instructs the {@code Scheduler} whether or not the {@code Job} should
 57  
      * be re-executed if a {@code recovery} or {@code fail-over} situation is
 58  
      * encountered.
 59  
      */
 60  
     boolean requestRecovery() default false;
 61  
 
 62  
     /**
 63  
      * Whether or not the {@code Job} should remain stored after it is
 64  
      * orphaned (no {@code Trigger}s point to it).
 65  
      */
 66  
     boolean storeDurably() default false;
 67  
 
 68  
     // Trigger
 69  
 
 70  
     /**
 71  
      * The {@code Trigger} name, must be unique within the group.
 72  
      */
 73  
     String triggerName() default DEFAULT;
 74  
 
 75  
     /**
 76  
      * The {@code Trigger} group.
 77  
      */
 78  
     String triggerGroup() default DEFAULT_GROUP;
 79  
 
 80  
     /**
 81  
      * The cron expression to base the schedule on.
 82  
      */
 83  
     String cronExpression();
 84  
 
 85  
     /**
 86  
      * The time zone for which the {@code cronExpression}
 87  
      * of this {@code CronTrigger} will be resolved.
 88  
      */
 89  
     String timeZoneId() default DEFAULT;
 90  
 
 91  
     /**
 92  
      * The {@code Trigger}'s priority.  When more than one {@code Trigger} have the same
 93  
      * fire time, the scheduler will fire the one with the highest priority
 94  
      * first.
 95  
      */
 96  
     int priority() default 0;
 97  
 
 98  
 }