@Override public boolean isRunning() throws SchedulingException { if (this.scheduler != null) { try { return !this.scheduler.isInStandbyMode(); } catch (SchedulerException ex) { return false; } } return false; }
@Override public boolean isRunning() throws SchedulingException { if (this.scheduler != null) { try { return !this.scheduler.isInStandbyMode(); } catch (SchedulerException ex) { return false; } } return false; }
@Override public boolean isRunning() throws SchedulingException { if (this.scheduler != null) { try { return !this.scheduler.isInStandbyMode(); } catch (SchedulerException ex) { return false; } } return false; }
@Override public boolean isRunning() { try { return schedulerStarted && !scheduler.isInStandbyMode(); } catch (SchedulerException ex) { return false; } }
public boolean isInStandbyMode() throws SchedulerException { return this.scheduler.isInStandbyMode(); }
@Override public boolean isRunning() { try { return !disabled && !scheduler.isInStandbyMode(); } catch (final SchedulerException e) { throw new IllegalStateException("SchedulerException while calling isInStandbyMode", e); } }
/** * @return * * @see QuartzService#schedulerPaused() */ public Boolean isSchedulerPaused() { try { return this.scheduler.isInStandbyMode(); } catch (SchedulerException e) { logger.error("error retrieveing scheduler condition", e); } return null; }
@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"; }
@Override public boolean isInStandbyMode() throws SchedulerException { return getScheduler().isInStandbyMode(); }
public static boolean isStandby() throws SchedulerException { Scheduler sched = StdSchedulerFactory.getDefaultScheduler(); return sched.isInStandbyMode(); }
@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); } }
public boolean isInStandbyMode() { try { return scheduler.isInStandbyMode(); } catch (SchedulerException e) { throw new QuartzRuntimeException(e); } }
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); } }
@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; }
@Override public boolean isInStandbyMode() throws QuartzException { try { return delegate.isInStandbyMode(); } catch (SchedulerException e) { Logger.error(e.getMessage()); throw new QuartzException(e); } }
@Override public boolean isInStandbyMode() throws QuartzException { try { return delegate.isInStandbyMode(); } catch (SchedulerException e) { Logger.error(e.getMessage()); throw new QuartzException(e); } }
@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); }
@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); }
@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; } }
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; } }