public synchronized Scheduler getScheduler() { if (this.scheduler==null) { this.scheduler = new Scheduler("ActiveMQ Broker["+getBrokerName()+"] Scheduler"); try { this.scheduler.start(); } catch (Exception e) { LOG.error("Failed to start Scheduler", e); } } return this.scheduler; }
this.scheduler = new Scheduler("Journal Scheduler"); this.scheduler.start(); this.scheduler.executePeriodically(periodicCheckpointTask, checkpointInterval / 10);
protected Scheduler getScheduler() throws JMSException { Scheduler result = scheduler; if (result == null) { if (isClosing() || isClosed()) { // without lock contention report the closing state throw new ConnectionClosedException(); } synchronized (this) { result = scheduler; if (result == null) { checkClosed(); try { result = new Scheduler("ActiveMQConnection["+info.getConnectionId().getValue()+"] Scheduler"); result.start(); scheduler = result; } catch(Exception e) { throw JMSExceptionSupport.create(e); } } } } return result; }
scheduler = new Scheduler(PListStoreImpl.class.getSimpleName()); scheduler.start();
if (flag) { thread = new Scheduler(); thread.start(); } else { thread.interrupt(); }
private void scheduleNextUpdate() { new Scheduler().start(); }
public class Test { public static void main(String[] args) throws InterruptedException { Scheduler s = new Scheduler(100); ExecutorService exec = Executors.newFixedThreadPool(4); for(int i = 0; i < 4; i++) { exec.submit(new Task(s)); } exec.shutdown(); exec.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS); } }
public static void main(String[] args) { Scheduler scheduler = new Scheduler(); scheduler.addPeriodicJob("name", new Object(), Collections.EMPTY_MAP, 10, false); }
// Creates a Constituent Scheduler instance. Scheduler myFirstScheduler = new Scheduler(); // Creates a Summary Scheduler instance. Scheduler mySecondScheduler = new Scheduler(); // Schedule a once-a-week task at 8am on Sunday. myFirstScheduler("0 8 * * 7", new Runnable() { public void run() { //DO SOMETHING } }); //Schedule a twice a day task at 7am and 6pm on weekdays mySecondScheduler("0 7 * * 1-5 |0 18 * * 1-5 ", new Runnable() { public void run() { //DO SOMETHING } });
public synchronized Scheduler getScheduler() { if (this.scheduler==null) { this.scheduler = new Scheduler("ActiveMQ Broker["+getBrokerName()+"] Scheduler"); try { this.scheduler.start(); } catch (Exception e) { LOG.error("Failed to start Scheduler", e); } } return this.scheduler; }
public synchronized Scheduler getScheduler() { if (this.scheduler==null) { this.scheduler = new Scheduler("ActiveMQ Broker["+getBrokerName()+"] Scheduler"); try { this.scheduler.start(); } catch (Exception e) { LOG.error("Failed to start Scheduler", e); } } return this.scheduler; }
public synchronized Scheduler getScheduler() { if (this.scheduler==null) { this.scheduler = new Scheduler("ActiveMQ Broker["+getBrokerName()+"] Scheduler"); try { this.scheduler.start(); } catch (Exception e) { LOG.error("Failed to start Scheduler", e); } } return this.scheduler; }
public static void main(String[] args) { Scheduler scheduler = new Scheduler(); ScheduleOptions options = scheduler.NOW(-1, (long) 10).name("name").config((Map<String, Serializable>) Collections.EMPTY_MAP).canRunConcurrently(false); scheduler.schedule(new Object(), options); }
public static void main(String[] args) { Scheduler scheduler = new Scheduler(); ScheduleOptions options = scheduler .NOW(-1, 10) .name("name") .config(Collections.EMPTY_MAP) .canRunConcurrently(false); scheduler.schedule(new Object(), options); }
public synchronized Scheduler getScheduler() { if (this.scheduler==null) { this.scheduler = new Scheduler("ActiveMQ Broker["+getBrokerName()+"] Scheduler"); try { this.scheduler.start(); } catch (Exception e) { LOG.error("Failed to start Scheduler ",e); } } return this.scheduler; }
public static void main(String[] args) { Scheduler scheduler = new Scheduler(); scheduler.schedule(new Object(), scheduler.NOW(-1, 10)); }
protected Scheduler getScheduler() throws JMSException { Scheduler result = scheduler; if (result == null) { if (isClosing() || isClosed()) { // without lock contention report the closing state throw new ConnectionClosedException(); } synchronized (this) { result = scheduler; if (result == null) { checkClosed(); try { result = new Scheduler("ActiveMQConnection["+info.getConnectionId().getValue()+"] Scheduler"); result.start(); scheduler = result; } catch(Exception e) { throw JMSExceptionSupport.create(e); } } } } return result; }
protected Scheduler getScheduler() throws JMSException { Scheduler result = scheduler; if (result == null) { if (isClosing() || isClosed()) { // without lock contention report the closing state throw new ConnectionClosedException(); } synchronized (this) { result = scheduler; if (result == null) { checkClosed(); try { result = new Scheduler("ActiveMQConnection["+info.getConnectionId().getValue()+"] Scheduler"); result.start(); scheduler = result; } catch(Exception e) { throw JMSExceptionSupport.create(e); } } } } return result; }
protected Scheduler getScheduler() throws JMSException { Scheduler result = scheduler; if (result == null) { if (isClosing() || isClosed()) { // without lock contention report the closing state throw new ConnectionClosedException(); } synchronized (this) { result = scheduler; if (result == null) { checkClosed(); try { result = new Scheduler("ActiveMQConnection["+info.getConnectionId().getValue()+"] Scheduler"); result.start(); scheduler = result; } catch(Exception e) { throw JMSExceptionSupport.create(e); } } } } return result; }