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


Java Scheduler.pauseJob方法代碼示例

本文整理匯總了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);
    }
}
 
開發者ID:gyp220203,項目名稱:renren-msg,代碼行數:11,代碼來源:ScheduleUtils.java

示例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);
}
 
開發者ID:Zigin,項目名稱:MonitorPlatform,代碼行數:12,代碼來源:JobConfigService.java

示例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();  
    }  
}
 
開發者ID:jeffreyning,項目名稱:nh-micro,代碼行數:17,代碼來源:MicroQuartzManager.java

示例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);
	}
}
 
開發者ID:wjggwm,項目名稱:webside,代碼行數:12,代碼來源:ScheduleJobServiceImpl.java

示例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);
}
 
開發者ID:Alfresco,項目名稱:alfresco-remote-api,代碼行數:60,代碼來源:RepoService.java

示例6: pauseJob

import org.quartz.Scheduler; //導入方法依賴的package包/類
public static void pauseJob(String jobName, String jobGroup, Scheduler scheduler) throws SchedulerException {
    scheduler.pauseJob(getJobKey(jobName, jobGroup));
}
 
開發者ID:quartzweb,項目名稱:quartz-web,代碼行數:4,代碼來源:QuartzUtils.java

示例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));
}
 
開發者ID:bsteker,項目名稱:bdf2,代碼行數:5,代碼來源:JobServiceImpl.java


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