本文整理了Java中org.quartz.Scheduler.pauseAll()
方法的一些代码示例,展示了Scheduler.pauseAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scheduler.pauseAll()
方法的具体详情如下:
包路径:org.quartz.Scheduler
类名称:Scheduler
方法名:pauseAll
[英]Pause all triggers - similar to calling pauseTriggerGroup(group)
on every group, however, after using this method resumeAll()
must be called to clear the scheduler's state of 'remembering' that all new triggers will be paused as they are added.
When resumeAll()
is called (to un-pause), trigger misfire instructions WILL be applied.
[中]暂停所有触发器-类似于对每个组调用pauseTriggerGroup(group)
,但是,在使用此方法后,必须调用resumeAll()
以清除计划程序的“记住”状态,即所有新触发器在添加时都将暂停。
调用resumeAll()
时(取消暂停),将应用触发缺火指令。
代码示例来源:origin: azkaban/azkaban
public void pause() {
logger.info("pausing all schedules in Quartz");
try {
this.scheduler.pauseAll();
} catch (final SchedulerException e) {
logger.error("Exception pausing scheduler: ", e);
}
}
代码示例来源:origin: javamelody/javamelody
private void pauseAllJobs() {
try {
for (final Scheduler scheduler : JobInformations.getAllSchedulers()) {
scheduler.pauseAll();
}
} catch (final Exception e) {
throw new IllegalStateException(e);
}
}
代码示例来源:origin: elasticjob/elastic-job-lite
/**
* 暂停作业.
*/
public synchronized void pauseJob() {
try {
if (!scheduler.isShutdown()) {
scheduler.pauseAll();
}
} catch (final SchedulerException ex) {
throw new JobSystemException(ex);
}
}
代码示例来源:origin: org.terracotta.modules/tim-tree-map-cache
public void pause() throws SchedulerException {
if (_enabled) {
_sched.pauseAll();
}
}
代码示例来源:origin: com.manydesigns/portofino-quartz
@Override
public void stop() {
try {
scheduler.pauseAll();
} catch (SchedulerException e) {
logger.warn("Cannot pause scheduler", e);
} finally {
status = ModuleStatus.STOPPED;
}
}
代码示例来源:origin: com.blazebit/blaze-quartz-utils
public static void pause() throws SchedulerException {
Scheduler sched = StdSchedulerFactory.getDefaultScheduler();
sched.pauseAll();
}
代码示例来源:origin: lvhao/schedule-job
public boolean disableAll(){
try {
scheduler.pauseAll();
return true;
} catch (SchedulerException e) {
e.printStackTrace();
}
return false;
}
代码示例来源:origin: org.opennms/opennms-provisiond
/**
* <p>pause</p>
*
* @throws org.quartz.SchedulerException if any.
*/
public void pause() throws SchedulerException {
getScheduler().pauseAll();
}
代码示例来源:origin: myschedule/myschedule-quartz-extra
public void pauseAll() {
try {
scheduler.pauseAll();
} catch (SchedulerException e) {
throw new QuartzRuntimeException(e);
}
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>pause</p>
*
* @throws org.quartz.SchedulerException if any.
*/
public void pause() throws SchedulerException {
getScheduler().pauseAll();
}
代码示例来源:origin: OpenWiseSolutions/openhub-framework
@Override
public void pauseAll() throws SchedulerException {
getScheduler().pauseAll();
}
代码示例来源:origin: net.bull.javamelody/javamelody-core
private void pauseAllJobs() {
try {
for (final Scheduler scheduler : JobInformations.getAllSchedulers()) {
scheduler.pauseAll();
}
} catch (final Exception e) {
throw new IllegalStateException(e);
}
}
代码示例来源:origin: org.codelibs/elasticsearch-quartz
public void pauseAll() {
try {
scheduler.pauseAll();
} catch (final SchedulerException e) {
throw new QuartzSchedulerException(e);
}
}
代码示例来源:origin: com.quhaodian.discover/discover-quartz
@RequestMapping(value = "/admin/crontask/pauseall")
public String pauseAll(Model model) {
Scheduler scheduler = getScheduler();
if (scheduler != null) {
try {
scheduler.pauseAll();
} catch (SchedulerException e) {
e.printStackTrace();
}
}
return "redirect:/admin/crontask/index.htm";
}
代码示例来源:origin: com.dangdang/elastic-job-lite-core
/**
* 暂停作业.
*/
public synchronized void pauseJob() {
try {
if (!scheduler.isShutdown()) {
scheduler.pauseAll();
}
} catch (final SchedulerException ex) {
throw new JobSystemException(ex);
}
}
代码示例来源:origin: org.mule.modules/mule-module-schedulers
@Override
public void stop() throws MuleException
{
try
{
quartzScheduler.pauseAll();
}
catch (SchedulerException e)
{
throw new DefaultMuleException(couldNotPauseSchedulers(), e);
}
}
代码示例来源:origin: org.codelibs/elasticsearch-quartz
@Override
protected void doStop() throws ElasticsearchException {
logger.info("Stopping Scheduler...");
synchronized (scheduler) {
try {
scheduler.pauseAll();
isPause = true;
} catch (final SchedulerException e) {
throw new QuartzSchedulerException("Failed to stop Scheduler.",
e);
}
}
}
代码示例来源:origin: com.threewks.thundr/thundr-contrib-quartz
@Override
public void pauseAll() throws QuartzException {
try {
delegate.pauseAll();
} catch (SchedulerException e) {
Logger.error(e.getMessage());
throw new QuartzException(e);
}
}
代码示例来源:origin: com.threewks.thundr/thundr-quartz
@Override
public void pauseAll() throws QuartzException {
try {
delegate.pauseAll();
} catch (SchedulerException e) {
Logger.error(e.getMessage());
throw new QuartzException(e);
}
}
代码示例来源:origin: wso2/wso2-synapse
@Override
public boolean pauseAll() {
try {
assertInitialized();
assertStarted();
synchronized (lock) {
scheduler.pauseAll();
}
} catch (SchedulerException e) {
throw new SynapseTaskException("Error pausing tasks ", e, logger);
}
return true;
}
内容来源于网络,如有侵权,请联系作者删除!