Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ScheduledJob |
|
| 1.0;1 |
1 | package org.apache.turbine.modules; | |
2 | ||
3 | ||
4 | /* | |
5 | * Licensed to the Apache Software Foundation (ASF) under one | |
6 | * or more contributor license agreements. See the NOTICE file | |
7 | * distributed with this work for additional information | |
8 | * regarding copyright ownership. The ASF licenses this file | |
9 | * to you under the Apache License, Version 2.0 (the | |
10 | * "License"); you may not use this file except in compliance | |
11 | * with the License. You may obtain a copy of the License at | |
12 | * | |
13 | * http://www.apache.org/licenses/LICENSE-2.0 | |
14 | * | |
15 | * Unless required by applicable law or agreed to in writing, | |
16 | * software distributed under the License is distributed on an | |
17 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
18 | * KIND, either express or implied. See the License for the | |
19 | * specific language governing permissions and limitations | |
20 | * under the License. | |
21 | */ | |
22 | ||
23 | ||
24 | // Turbine Scheduler Classes | |
25 | ||
26 | import org.apache.turbine.services.schedule.JobEntry; | |
27 | ||
28 | /** | |
29 | * All Scheduled jobs should implement this. The class that implements | |
30 | * ScheduledJob should contain the code that you actually want to | |
31 | * execute at a specific time. The name of this class is what you | |
32 | * register in the JobEntry. | |
33 | * | |
34 | * @author <a href="mailto:mbryson@mindspring.com">Dave Bryson</a> | |
35 | * @version $Id: ScheduledJob.java 1854786 2019-03-04 18:29:18Z tv $ | |
36 | */ | |
37 | @FunctionalInterface | |
38 | public interface ScheduledJob extends Assembler | |
39 | { | |
40 | /** Prefix for scheduler job related classes */ | |
41 | String PREFIX = "scheduledjobs"; | |
42 | ||
43 | /** The key for the scheduler job cache size if module caching is on. */ | |
44 | String CACHE_SIZE_KEY = "scheduledjob.cache.size"; | |
45 | ||
46 | /** The default size of the scheduler job cache if module caching is on. */ | |
47 | int CACHE_SIZE_DEFAULT = 10; | |
48 | ||
49 | /** Represents Scheduled Job Objects */ | |
50 | String NAME = "scheduledjob"; | |
51 | ||
52 | /** | |
53 | * Run the Jobentry from the scheduler queue. | |
54 | * | |
55 | * @param job The job to run. | |
56 | * @throws Exception if something goes wrong | |
57 | */ | |
58 | void run(JobEntry job) throws Exception; | |
59 | } |