當前位置: 首頁>>代碼示例>>Java>>正文


Java JobScheduler類代碼示例

本文整理匯總了Java中com.dangdang.ddframe.job.lite.api.JobScheduler的典型用法代碼示例。如果您正苦於以下問題:Java JobScheduler類的具體用法?Java JobScheduler怎麽用?Java JobScheduler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


JobScheduler類屬於com.dangdang.ddframe.job.lite.api包,在下文中一共展示了JobScheduler類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: registryTransactionCheckJob

import com.dangdang.ddframe.job.lite.api.JobScheduler; //導入依賴的package包/類
@Bean(initMethod = "init")
public JobScheduler registryTransactionCheckJob(TransactionCheckJob transactionCheckJob) {
    LiteJobConfiguration liteJobConfiguration = LiteJobConfiguration.newBuilder(new SimpleJobConfiguration(
            JobCoreConfiguration.newBuilder(TransactionCheckJob.class.getSimpleName(), "0 0/1 * * * ?", 1).build(),
            TransactionCheckJob.class.getCanonicalName())).overwrite(true).build();
    return new SpringJobScheduler(transactionCheckJob, regCenter, liteJobConfiguration);
}
 
開發者ID:yanghuijava,項目名稱:elephant,代碼行數:8,代碼來源:ElasticJobConfigurer.java

示例2: registryRetrySendMQJob

import com.dangdang.ddframe.job.lite.api.JobScheduler; //導入依賴的package包/類
@Bean(initMethod = "init")
public JobScheduler registryRetrySendMQJob(RetrySendMQJob retrySendMQJob) {
    LiteJobConfiguration liteJobConfiguration = LiteJobConfiguration.newBuilder(new SimpleJobConfiguration(
            JobCoreConfiguration.newBuilder(RetrySendMQJob.class.getSimpleName(), "0 0/1 * * * ?", 1).build(),
            RetrySendMQJob.class.getCanonicalName())).overwrite(true).build();
    return new SpringJobScheduler(retrySendMQJob, regCenter, liteJobConfiguration);
}
 
開發者ID:yanghuijava,項目名稱:elephant,代碼行數:8,代碼來源:ElasticJobConfigurer.java

示例3: setUpSimpleJob

import com.dangdang.ddframe.job.lite.api.JobScheduler; //導入依賴的package包/類
private static void setUpSimpleJob(final CoordinatorRegistryCenter regCenter, final JobEventConfiguration jobEventConfig) {
    JobCoreConfiguration coreConfig = JobCoreConfiguration.newBuilder("javaSimpleJob", "0/5 * * * * ?", 3).shardingItemParameters("0=Beijing,1=Shanghai,2=Guangzhou").build();
    SimpleJobConfiguration simpleJobConfig = new SimpleJobConfiguration(coreConfig, JavaSimpleJob.class.getCanonicalName());
    new JobScheduler(regCenter, LiteJobConfiguration.newBuilder(simpleJobConfig).build(), jobEventConfig).init();
}
 
開發者ID:elasticjob,項目名稱:elastic-job-example,代碼行數:6,代碼來源:JavaMain.java

示例4: setUpDataflowJob

import com.dangdang.ddframe.job.lite.api.JobScheduler; //導入依賴的package包/類
private static void setUpDataflowJob(final CoordinatorRegistryCenter regCenter, final JobEventConfiguration jobEventConfig) {
    JobCoreConfiguration coreConfig = JobCoreConfiguration.newBuilder("javaDataflowElasticJob", "0/5 * * * * ?", 3).shardingItemParameters("0=Beijing,1=Shanghai,2=Guangzhou").build();
    DataflowJobConfiguration dataflowJobConfig = new DataflowJobConfiguration(coreConfig, JavaDataflowJob.class.getCanonicalName(), true);
    new JobScheduler(regCenter, LiteJobConfiguration.newBuilder(dataflowJobConfig).build(), jobEventConfig).init();
}
 
開發者ID:elasticjob,項目名稱:elastic-job-example,代碼行數:6,代碼來源:JavaMain.java

示例5: setUpScriptJob

import com.dangdang.ddframe.job.lite.api.JobScheduler; //導入依賴的package包/類
private static void setUpScriptJob(final CoordinatorRegistryCenter regCenter, final JobEventConfiguration jobEventConfig) throws IOException {
    JobCoreConfiguration coreConfig = JobCoreConfiguration.newBuilder("scriptElasticJob", "0/5 * * * * ?", 3).build();
    ScriptJobConfiguration scriptJobConfig = new ScriptJobConfiguration(coreConfig, buildScriptCommandLine());
    new JobScheduler(regCenter, LiteJobConfiguration.newBuilder(scriptJobConfig).build(), jobEventConfig).init();
}
 
開發者ID:elasticjob,項目名稱:elastic-job-example,代碼行數:6,代碼來源:JavaMain.java

示例6: simpleJobScheduler

import com.dangdang.ddframe.job.lite.api.JobScheduler; //導入依賴的package包/類
@Bean(initMethod = "init")
public JobScheduler simpleJobScheduler(final SimpleJob simpleJob, @Value("${simpleJob.cron}") final String cron, @Value("${simpleJob.shardingTotalCount}") final int shardingTotalCount,
                                       @Value("${simpleJob.shardingItemParameters}") final String shardingItemParameters) {
    return new SpringJobScheduler(simpleJob, regCenter, getLiteJobConfiguration(simpleJob.getClass(), cron, shardingTotalCount, shardingItemParameters), jobEventConfiguration);
}
 
開發者ID:elasticjob,項目名稱:elastic-job-example,代碼行數:6,代碼來源:SimpleJobConfig.java

示例7: dataflowJobScheduler

import com.dangdang.ddframe.job.lite.api.JobScheduler; //導入依賴的package包/類
@Bean(initMethod = "init")
public JobScheduler dataflowJobScheduler(final DataflowJob dataflowJob, @Value("${dataflowJob.cron}") final String cron, @Value("${dataflowJob.shardingTotalCount}") final int shardingTotalCount,
                                       @Value("${dataflowJob.shardingItemParameters}") final String shardingItemParameters) {
    return new SpringJobScheduler(dataflowJob, regCenter, getLiteJobConfiguration(dataflowJob.getClass(), cron, shardingTotalCount, shardingItemParameters), jobEventConfiguration);
}
 
開發者ID:elasticjob,項目名稱:elastic-job-example,代碼行數:6,代碼來源:DataflowJobConfig.java

示例8: main

import com.dangdang.ddframe.job.lite.api.JobScheduler; //導入依賴的package包/類
public static void main(String[] args) {
  new JobScheduler(createRegistryCenter(), createJobConfiguration()).init();
}
 
開發者ID:whyDK37,項目名稱:pinenut,代碼行數:4,代碼來源:JobDemo.java


注:本文中的com.dangdang.ddframe.job.lite.api.JobScheduler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。