本文整理了Java中org.quartz.Scheduler.isStarted()
方法的一些代码示例,展示了Scheduler.isStarted()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scheduler.isStarted()
方法的具体详情如下:
包路径:org.quartz.Scheduler
类名称:Scheduler
方法名:isStarted
[英]Whether the scheduler has been started.
Note: This only reflects whether #start()
has ever been called on this Scheduler, so it will return true
even if the Scheduler
is currently in standby mode or has been since shutdown.
[中]计划程序是否已启动。
注意:这只反映是否在此计划程序上调用过#start()
,因此即使Scheduler
当前处于待机模式或关闭后已被调用,它也将返回true
。
代码示例来源:origin: spring-projects/spring-framework
@Test
@SuppressWarnings("resource")
public void schedulerAutoStartupFalse() throws Exception {
StaticApplicationContext context = new StaticApplicationContext();
BeanDefinition beanDefinition = BeanDefinitionBuilder.genericBeanDefinition(SchedulerFactoryBean.class)
.addPropertyValue("autoStartup", false).getBeanDefinition();
context.registerBeanDefinition("scheduler", beanDefinition);
Scheduler bean = context.getBean("scheduler", Scheduler.class);
assertFalse(bean.isStarted());
context.refresh();
assertFalse(bean.isStarted());
}
代码示例来源:origin: spring-projects/spring-framework
@Test
@SuppressWarnings("resource")
public void schedulerAutoStartsOnContextRefreshedEventByDefault() throws Exception {
StaticApplicationContext context = new StaticApplicationContext();
context.registerBeanDefinition("scheduler", new RootBeanDefinition(SchedulerFactoryBean.class));
Scheduler bean = context.getBean("scheduler", Scheduler.class);
assertFalse(bean.isStarted());
context.refresh();
assertTrue(bean.isStarted());
}
代码示例来源:origin: apache/incubator-gobblin
scheduler.startAsync();
scheduler.awaitRunning(10, TimeUnit.SECONDS);
Assert.assertTrue(scheduler._scheduler.getScheduler().isStarted());
代码示例来源:origin: org.projectodd/polyglot-jobs
public boolean isStarted() {
boolean started = false;
try {
started = this.scheduler != null && this.scheduler.isStarted();
} catch (SchedulerException e) {
//ignore
}
return started;
}
代码示例来源:origin: com.gitblit.fathom/fathom-quartz
@Override
public boolean isRunning() {
try {
return scheduler.isStarted();
} catch (SchedulerException e) {
return false;
}
}
代码示例来源:origin: org.apache.camel/camel-quartz2
@Override
public boolean isSchedulerStarted() {
try {
return quartzScheduler != null && quartzScheduler.isStarted();
} catch (SchedulerException e) {
return false;
}
}
代码示例来源:origin: gitblit/fathom
@Override
public boolean isRunning() {
try {
return scheduler.isStarted();
} catch (SchedulerException e) {
return false;
}
}
代码示例来源:origin: sakaiproject/sakai
@Override
public boolean isRunning() {
try {
return scheduler.isStarted();
} catch (SchedulerException e) {
log.debug("Failed to find if the scheduler is running", e);
}
return false;
}
}
代码示例来源:origin: org.sakaiproject.scheduler/scheduler-component-shared
@Override
public boolean isRunning() {
try {
return scheduler.isStarted();
} catch (SchedulerException e) {
log.debug("Failed to find if the scheduler is running", e);
}
return false;
}
}
代码示例来源:origin: com.threewks.thundr/thundr-contrib-quartz
@Override
public boolean isStarted() throws QuartzException {
try {
return delegate.isStarted();
} catch (SchedulerException e) {
throw new QuartzException(e);
}
}
代码示例来源:origin: myschedule/myschedule-quartz-extra
public boolean isStarted() {
try {
return scheduler.isStarted();
} catch (SchedulerException e) {
throw new QuartzRuntimeException(e);
}
}
代码示例来源:origin: com.threewks.thundr/thundr-quartz
@Override
public boolean isStarted() throws QuartzException {
try {
return delegate.isStarted();
} catch (SchedulerException e) {
throw new QuartzException(e);
}
}
代码示例来源:origin: org.easybatch/easybatch-quartz
/**
* Check if the scheduler is started.
*
* @throws JobSchedulerException thrown if the scheduler status cannot be checked
*/
public boolean isStarted() throws JobSchedulerException {
try {
return scheduler.isStarted();
} catch (SchedulerException e) {
throw new JobSchedulerException("An exception occurred during checking if the scheduler is started", e);
}
}
代码示例来源:origin: org.mule.modules/mule-module-schedulers
public boolean isStarted() throws MuleException
{
try
{
return quartzScheduler.isStarted();
}
catch (SchedulerException e)
{
throw new DefaultMuleException(couldNotGetSchedulerStatus(), e);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public boolean isStarted() throws SSchedulerException {
try {
return scheduler != null && scheduler.isStarted() && !scheduler.isShutdown();
} catch (final SchedulerException e) {
throw new SSchedulerException(e);
}
}
代码示例来源:origin: wso2/wso2-synapse
private void assertStarted() {
try {
synchronized (lock) {
if (!scheduler.isStarted()) {
throw new SynapseTaskException("Scheduler has not been started yet", logger);
}
}
} catch (SchedulerException e) {
throw new SynapseTaskException("Error determine start state of the scheduler ", e, logger);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public boolean isStarted() throws SSchedulerException {
try {
return scheduler != null && scheduler.isStarted() && !scheduler.isShutdown();
} catch (final SchedulerException e) {
throw new SSchedulerException(e);
}
}
代码示例来源:origin: com.nesscomputing.components/ness-quartz
@Test
public void testSimple() throws Exception
{
final Scheduler scheduler = injector.getInstance(Scheduler.class);
Assert.assertNotNull(scheduler);
Assert.assertFalse(scheduler.isStarted());
}
代码示例来源:origin: org.jabylon/scheduler
protected void removeJob(String jobID) {
if (scheduler == null)
return;
JobKey triggerKey = new JobKey(jobID);
try {
if (scheduler.isStarted() && !scheduler.isShutdown() && scheduler.checkExists(triggerKey)) {
scheduler.deleteJob(triggerKey);
}
} catch (SchedulerException e) {
logger.error("Failed to delete job " + jobID, e);
}
}
代码示例来源:origin: Evolveum/midpoint
private Boolean isQuartzSchedulerRunning() {
Scheduler quartzScheduler = getGlobalExecutionManager().getQuartzScheduler();
if (quartzScheduler == null) {
return null;
}
try {
return quartzScheduler.isStarted() && !quartzScheduler.isInStandbyMode() && !quartzScheduler.isShutdown();
} catch (SchedulerException e) {
LoggingUtils.logUnexpectedException(LOGGER, "Cannot determine Quartz scheduler state", e);
return null;
}
}
内容来源于网络,如有侵权,请联系作者删除!