本文整理了Java中org.quartz.Scheduler.isInStandbyMode()
方法的一些代码示例,展示了Scheduler.isInStandbyMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scheduler.isInStandbyMode()
方法的具体详情如下:
包路径:org.quartz.Scheduler
类名称:Scheduler
方法名:isInStandbyMode
[英]Reports whether the Scheduler
is in stand-by mode.
[中]报告Scheduler
是否处于待机模式。
代码示例来源:origin: spring-projects/spring-framework
@Override
public boolean isRunning() throws SchedulingException {
if (this.scheduler != null) {
try {
return !this.scheduler.isInStandbyMode();
}
catch (SchedulerException ex) {
return false;
}
}
return false;
}
代码示例来源:origin: org.springframework/spring-context-support
@Override
public boolean isRunning() throws SchedulingException {
if (this.scheduler != null) {
try {
return !this.scheduler.isInStandbyMode();
}
catch (SchedulerException ex) {
return false;
}
}
return false;
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public boolean isRunning() throws SchedulingException {
if (this.scheduler != null) {
try {
return !this.scheduler.isInStandbyMode();
}
catch (SchedulerException ex) {
return false;
}
}
return false;
}
代码示例来源:origin: OpenWiseSolutions/openhub-framework
@Override
public boolean isRunning() {
try {
return schedulerStarted && !scheduler.isInStandbyMode();
} catch (SchedulerException ex) {
return false;
}
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
public boolean isInStandbyMode() throws SchedulerException {
return this.scheduler.isInStandbyMode();
}
代码示例来源:origin: ezbz/projectx
@Override
public boolean isRunning() {
try {
return !disabled && !scheduler.isInStandbyMode();
} catch (final SchedulerException e) {
throw new IllegalStateException("SchedulerException while calling isInStandbyMode", e);
}
}
代码示例来源:origin: com.sangupta/jerry
/**
* @return
*
* @see QuartzService#schedulerPaused()
*/
public Boolean isSchedulerPaused() {
try {
return this.scheduler.isInStandbyMode();
} catch (SchedulerException e) {
logger.error("error retrieveing scheduler condition", e);
}
return null;
}
代码示例来源:origin: ezbz/projectx
@RequestMapping(value = "/welcome", method = RequestMethod.GET)
public @ResponseBody
String welcome() throws IOException, SchedulerException {
return "Welcome to the projectx temple, may your heart be strong and your katana sharp...<br/>Scheduler in standby: "
+ scheduler.isInStandbyMode()
+ "<br/><a href='pause'>Pause the scheduler</a>, <a href='start'>Start the scheduler</a><br/><a href='secure'>Go to secure area (tomcat/tomcat)</a";
}
代码示例来源:origin: OpenWiseSolutions/openhub-framework
@Override
public boolean isInStandbyMode() throws SchedulerException {
return getScheduler().isInStandbyMode();
}
代码示例来源:origin: com.blazebit/blaze-quartz-utils
public static boolean isStandby() throws SchedulerException {
Scheduler sched = StdSchedulerFactory.getDefaultScheduler();
return sched.isInStandbyMode();
}
代码示例来源:origin: net.bolbat/bb-kit
@Override
public boolean isPaused() throws SchedulerException {
try {
return scheduler.isInStandbyMode();
} catch (final org.quartz.SchedulerException e) {
final String message = "isStarted() fail";
LOGGER.error(message, e);
throw new SchedulerException(message, e);
}
}
代码示例来源:origin: myschedule/myschedule-quartz-extra
public boolean isInStandbyMode() {
try {
return scheduler.isInStandbyMode();
} catch (SchedulerException e) {
throw new QuartzRuntimeException(e);
}
}
代码示例来源:origin: de.svenkubiak/mangooio-core
public void standby() {
Preconditions.checkNotNull(this.scheduler);
try {
this.scheduler.standby();
if (this.scheduler.isInStandbyMode()) {
LOG.info("Scheduler is now in standby");
} else {
LOG.error("Failed to put scheduler in standby");
}
} catch (SchedulerException e) {
LOG.error("Failed to put scheduler in standby", e);
}
}
代码示例来源:origin: org.opensingular/singular-app-commons
@Override
public boolean isRunning() throws SchedulingException {
if (this.scheduler != null) {
try {
return !this.scheduler.isInStandbyMode();
} catch (SchedulerException ex) {
getLogger().trace(ex.getMessage(), ex);
return false;
}
}
return false;
}
代码示例来源:origin: com.threewks.thundr/thundr-contrib-quartz
@Override
public boolean isInStandbyMode() throws QuartzException {
try {
return delegate.isInStandbyMode();
} catch (SchedulerException e) {
Logger.error(e.getMessage());
throw new QuartzException(e);
}
}
代码示例来源:origin: com.threewks.thundr/thundr-quartz
@Override
public boolean isInStandbyMode() throws QuartzException {
try {
return delegate.isInStandbyMode();
} catch (SchedulerException e) {
Logger.error(e.getMessage());
throw new QuartzException(e);
}
}
代码示例来源:origin: ezbz/projectx
@Test
public void testIsRunning() throws SchedulerException {
when(scheduler.isInStandbyMode()).thenReturn(false);
final boolean running = classUnderTest.isRunning();
verify(scheduler).isInStandbyMode();
assertEquals("incorrect running result", true, running);
}
代码示例来源:origin: ezbz/projectx
@Test(expected = IllegalStateException.class)
public void testIsRunning_withException() throws SchedulerException {
doThrow(new SchedulerException()).when(scheduler).isInStandbyMode();
final boolean running = classUnderTest.isRunning();
verify(scheduler).isInStandbyMode();
assertEquals("incorrect running result", true, running);
}
代码示例来源:origin: Evolveum/midpoint
@Override
public boolean getServiceThreadsActivationState() {
try {
Scheduler scheduler = executionManager.getQuartzScheduler();
return scheduler != null && scheduler.isStarted() &&
!scheduler.isInStandbyMode() &&
!scheduler.isShutdown() &&
clusterManager.isClusterManagerThreadActive();
} catch (SchedulerException e) {
LoggingUtils.logUnexpectedException(LOGGER, "Cannot determine the state of the Quartz scheduler", e);
return false;
}
}
代码示例来源: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;
}
}
内容来源于网络,如有侵权,请联系作者删除!