本文整理汇总了Java中org.quartz.Scheduler.pauseJob方法的典型用法代码示例。如果您正苦于以下问题:Java Scheduler.pauseJob方法的具体用法?Java Scheduler.pauseJob怎么用?Java Scheduler.pauseJob使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.quartz.Scheduler
的用法示例。
在下文中一共展示了Scheduler.pauseJob方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: pauseJob
import org.quartz.Scheduler; //导入方法依赖的package包/类
/**
* 暂停任务
*/
public static void pauseJob(Scheduler scheduler, Long jobId) {
try {
scheduler.pauseJob(getJobKey(jobId));
} catch (SchedulerException e) {
throw new RRException("暂停定时任务失败", e);
}
}
示例2: pauseJob
import org.quartz.Scheduler; //导入方法依赖的package包/类
/**
* 暂停一个job
*
* @param scheduleJob
* @throws SchedulerException
*/
public void pauseJob(ScheduleJob scheduleJob) throws SchedulerException {
Scheduler scheduler = schedulerFactoryBean.getScheduler();
JobKey jobKey = JobKey.jobKey(scheduleJob.getName(), scheduleJob.getGroup());
scheduler.pauseJob(jobKey);
}
示例3: pauseJob
import org.quartz.Scheduler; //导入方法依赖的package包/类
/**
* @Description:暂停一个任务
* @param jobName
* @param jobGroupName
*
*/
public static void pauseJob(String jobName, String jobGroupName) {
JobKey jobKey =JobKey.jobKey(jobName, jobName);
try {
Scheduler sched = gSchedulerFactory.getScheduler();
sched.pauseJob(jobKey);
} catch (SchedulerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
示例4: pauseJob
import org.quartz.Scheduler; //导入方法依赖的package包/类
@Transactional
@Override
public boolean pauseJob(JobKey jobKey) {
try {
Scheduler scheduler = schedulerFactoryBean.getScheduler();
scheduler.pauseJob(jobKey);
return Boolean.TRUE;
} catch (SchedulerException e) {
throw new ServiceException(e);
}
}
示例5: RepoService
import org.quartz.Scheduler; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public RepoService(ApplicationContext applicationContext) throws Exception
{
this.applicationContext = applicationContext;
this.publicApiContext = new PublicApiTestContext(applicationContext);
this.authenticationService = (MutableAuthenticationService)applicationContext.getBean("AuthenticationService");
this.siteService = (SiteService)applicationContext.getBean("SiteService");
this.activityService = (ActivityService)applicationContext.getBean("activityService");
this.fileFolderService = (FileFolderService)applicationContext.getBean("FileFolderService");
this.contentService = (ContentService)applicationContext.getBean("ContentService");
this.commentService = (CommentService)applicationContext.getBean("CommentService");
this.nodeService = (NodeService)applicationContext.getBean("NodeService");
this.preferenceService = (PreferenceService)applicationContext.getBean("PreferenceService");
this.taggingService = (TaggingService)applicationContext.getBean("TaggingService");
this.ratingService = (RatingService)applicationContext.getBean("RatingService");
this.tenantService = (TenantService)applicationContext.getBean("tenantService");
this.tenantAdminService = (TenantAdminService)applicationContext.getBean("tenantAdminService");
this.personService = (PersonService)applicationContext.getBean("PersonService");
this.contentStoreCleaner = (ContentStoreCleaner)applicationContext.getBean("contentStoreCleaner");
this.postDAO = (ActivityPostDAO)applicationContext.getBean("postDAO");
this.nodeRatingSchemeRegistry = (NamedObjectRegistry<RatingScheme>)applicationContext.getBean("nodeRatingSchemeRegistry");
this.cociService = (CheckOutCheckInService)applicationContext.getBean("CheckoutCheckinService");
this.favouritesService = (FavouritesService)applicationContext.getBean("FavouritesService");
this.dictionaryService = (DictionaryService)applicationContext.getBean("dictionaryService");
this.invitationService = (InvitationService)applicationContext.getBean("InvitationService");
this.lockService = (LockService)applicationContext.getBean("LockService");
this.cmisConnector = (CMISConnector)applicationContext.getBean("CMISConnector");
this.nodeIndexer = (NodeIndexer)applicationContext.getBean("nodeIndexer");
this.activities = (Activities)applicationContext.getBean("activities");
this.hiddenAspect = (HiddenAspect)applicationContext.getBean("hiddenAspect");
this.networksService = (NetworksService)applicationContext.getBean("networksService");
this.namespaceService = (NamespaceService)applicationContext.getBean("namespaceService");
this.transactionHelper = (RetryingTransactionHelper)applicationContext.getBean("retryingTransactionHelper");
Scheduler scheduler = (Scheduler)applicationContext.getBean("schedulerFactory");
JobDetailBean contentStoreCleanerJobDetail = (JobDetailBean)applicationContext.getBean("contentStoreCleanerJobDetail");
scheduler.pauseJob(contentStoreCleanerJobDetail.getName(), contentStoreCleanerJobDetail.getGroup());
ChildApplicationContextFactory activitiesFeed = (ChildApplicationContextFactory)applicationContext.getBean("ActivitiesFeed");
ApplicationContext activitiesFeedCtx = activitiesFeed.getApplicationContext();
this.postLookup = (PostLookup)activitiesFeedCtx.getBean("postLookup");
this.feedGenerator = (FeedGenerator)activitiesFeedCtx.getBean("feedGenerator");
this.feedGeneratorJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("feedGeneratorJobDetail");
this.postLookupJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("postLookupJobDetail");
this.feedCleanerJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("feedCleanerJobDetail");
this.postCleanerJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("postCleanerJobDetail");
this.feedNotifierJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("feedNotifierJobDetail");
this.feedCleaner = (FeedCleaner)activitiesFeedCtx.getBean("feedCleaner");
// Pause activities jobs so that we aren't competing with their scheduled versions
scheduler.pauseJob(feedGeneratorJobDetail.getName(), feedGeneratorJobDetail.getGroup());
scheduler.pauseJob(postLookupJobDetail.getName(), postLookupJobDetail.getGroup());
scheduler.pauseJob(feedCleanerJobDetail.getName(), feedCleanerJobDetail.getGroup());
scheduler.pauseJob(postCleanerJobDetail.getName(), postCleanerJobDetail.getGroup());
scheduler.pauseJob(feedNotifierJobDetail.getName(), feedNotifierJobDetail.getGroup());
this.systemNetwork = new TestNetwork(TenantService.DEFAULT_DOMAIN, true);
}
示例6: pauseJob
import org.quartz.Scheduler; //导入方法依赖的package包/类
public static void pauseJob(String jobName, String jobGroup, Scheduler scheduler) throws SchedulerException {
scheduler.pauseJob(getJobKey(jobName, jobGroup));
}
示例7: pauseJob
import org.quartz.Scheduler; //导入方法依赖的package包/类
public void pauseJob(String jobDefId,String companyId) throws SchedulerException {
Scheduler scheduler=schedulerService.retrieveScheduler();
scheduler.pauseJob(new JobKey(JOB_PREFIX+jobDefId,companyId));
}