public Timer createIntervalTimer(long initialDuration, long intervalDuration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertAllowedIn("TimerService.createIntervalTimer"); return timerService.createIntervalTimer(initialDuration, intervalDuration, timerConfig); }
public Timer createIntervalTimer(long initialDuration, long intervalDuration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertAllowedIn("TimerService.createIntervalTimer"); return timerService.createIntervalTimer(initialDuration, intervalDuration, timerConfig); }
public Timer createIntervalTimer(Date initialExpiration, long intervalDuration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertAllowedIn("TimerService.createIntervalTimer"); return timerService.createIntervalTimer(initialExpiration, intervalDuration, timerConfig); }
public Timer createIntervalTimer(Date initialExpiration, long intervalDuration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertAllowedIn("TimerService.createIntervalTimer"); return timerService.createIntervalTimer(initialExpiration, intervalDuration, timerConfig); }
public Timer createIntervalTimer(long initialDuration, long intervalDuration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertAllowedIn("TimerService.createIntervalTimer"); return delegate.createIntervalTimer(initialDuration, intervalDuration, timerConfig); }
public Timer createIntervalTimer(long initialDuration, long intervalDuration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertAllowedIn("TimerService.createIntervalTimer"); return timerService.createIntervalTimer(initialDuration, intervalDuration, timerConfig); }
public Timer createIntervalTimer(Date initialExpiration, long intervalDuration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertAllowedIn("TimerService.createIntervalTimer"); return timerService.createIntervalTimer(initialExpiration, intervalDuration, timerConfig); }
public Timer createIntervalTimer(Date initialDuration, long intervalDuration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertAllowedIn("TimerService.createIntervalTimer"); return delegate.createIntervalTimer(initialDuration, intervalDuration, timerConfig); }
public Timer createIntervalTimer(final long l, final long l1, final TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { return getTimerService().createIntervalTimer(l, l1, timerConfig); }
@PostConstruct public void init() { ts.createIntervalTimer(0l, TimeUnit.SECONDS.toMillis(1), new TimerConfig("a test timer", false)); }
public Timer createIntervalTimer(final long l, final long l1, final TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { return getTimerService().createIntervalTimer(l, l1, timerConfig); }
public Timer createIntervalTimer(final Date date, final long l, final TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { return getTimerService().createIntervalTimer(date, l, timerConfig); }
public Timer createIntervalTimer(final Date date, final long l, final TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { return getTimerService().createIntervalTimer(date, l, timerConfig); }
public void scheduleSessionPurgeJob() { // each time the webapp is reloaded, we don't want to create duplicate jobs Collection<Timer> timers = timerService.getTimers(); for (Timer existingTimer : timers) { if (log.isDebugEnabled()) { log.debug("Found timer - attempting to cancel: " + existingTimer.toString()); } try { existingTimer.cancel(); } catch (Exception e) { log.warn("Failed in attempting to cancel timer: " + existingTimer.toString()); } } // timer that will trigger every 60 seconds timerService.createIntervalTimer(60000L, 60000L, new TimerConfig(null, false)); }
public void scheduleStorageSessionMaintenance() { // each time the webapp is reloaded, we don't want to create duplicate jobs Collection<Timer> timers = timerService.getTimers(); for (Timer existingTimer : timers) { if (LOG.isDebugEnabled()) { LOG.debug("Found timer - attempting to cancel: " + existingTimer.toString()); } try { existingTimer.cancel(); } catch (Exception e) { LOG.warn("Failed in attempting to cancel timer: " + existingTimer.toString()); } } // timer that will trigger every 90 seconds after an initial wait of 30 seconds timerService.createIntervalTimer(30000L, 90000L, new TimerConfig(null, false)); }
@Override public void scheduleConfigCacheReloader() { // each time the webapp is reloaded, we don't want to create duplicate jobs Collection<Timer> timers = timerService.getTimers(); for (Timer existingTimer : timers) { LOG.debug("Found timer - attempting to cancel: " + existingTimer.toString()); try { existingTimer.cancel(); } catch (Exception e) { LOG.warn("Failed in attempting to cancel timer: " + existingTimer.toString()); } } // timer that will trigger every 60 seconds timerService.createIntervalTimer(60000L, 60000L, new TimerConfig(null, false)); }
public void scheduleServerHeartbeat() { /* each time the webapp is reloaded, it would create * duplicate events if we don't cancel the existing ones */ Collection<Timer> timers = timerService.getTimers(); for (Timer existingTimer : timers) { log.debug("Found timer - attempting to cancel: " + existingTimer.toString()); try { existingTimer.cancel(); } catch (Exception e) { log.warn("Failed in attempting to cancel timer: " + existingTimer.toString()); } } // single-action timer that will trigger in 30 seconds timerService.createIntervalTimer(30000L, 30000L, new TimerConfig(null, false)); }
@Override public void scheduleServerCacheReloader() { /* each time the webapp is reloaded, it would create * duplicate events if we don't cancel the existing ones */ Collection<Timer> timers = timerService.getTimers(); for (Timer existingTimer : timers) { log.debug("Found timer - attempting to cancel: " + existingTimer.toString()); try { existingTimer.cancel(); } catch (Exception e) { log.warn("Failed in attempting to cancel timer: " + existingTimer.toString()); } } timerService.createIntervalTimer(30000L, 30000L, new TimerConfig(null, false)); }
public synchronized void reschedule(final String durationStr) { stop(); final long duration = new LongDuration(ofNullable(durationStr).orElse("1 minute")).getTime(MILLISECONDS); timer = timerService.createIntervalTimer(duration, duration, new TimerConfig(GracefulReleaser.class.getName() + ".run", false)); }
private synchronized void reschedule() { stop(); final long interval = policies.validationInterval("1 hour"); timer = service.createIntervalTimer(interval /*should it be something smaller?*/, interval, new TimerConfig(ExpirationNotifier.class.getName(), false)); }