forked from apache/shardingsphere-elasticjob
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...-job-lite-core/src/main/java/com/dangdang/ddframe/job/lite/internal/schedule/LiteJob.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.dangdang.ddframe.job.lite.internal.schedule; | ||
|
||
import com.dangdang.ddframe.job.api.ElasticJob; | ||
import com.dangdang.ddframe.job.executor.JobExecutorFactory; | ||
import com.dangdang.ddframe.job.executor.JobFacade; | ||
import lombok.Setter; | ||
import org.quartz.Job; | ||
import org.quartz.JobExecutionContext; | ||
import org.quartz.JobExecutionException; | ||
|
||
/** | ||
* Lite调度作业. | ||
* | ||
* @author zhangliang | ||
*/ | ||
public final class LiteJob implements Job { | ||
|
||
@Setter | ||
private ElasticJob elasticJob; | ||
|
||
@Setter | ||
private JobFacade jobFacade; | ||
|
||
@Override | ||
public void execute(final JobExecutionContext context) throws JobExecutionException { | ||
JobExecutorFactory.getJobExecutor(elasticJob, jobFacade).execute(); | ||
} | ||
} |