Package org.quartz.simpl

Examples of org.quartz.simpl.RAMJobStore


        final QuartzThreadPool quartzPool = new QuartzThreadPool(this.threadPool);

        final DirectSchedulerFactory factory = DirectSchedulerFactory.getInstance();
        // unique run id
        final String runID = new Date().toString().replace(' ', '_');
        factory.createScheduler(QUARTZ_SCHEDULER_NAME, runID, quartzPool, new RAMJobStore());
        // quartz does not provide a way to get the scheduler by name AND runID, so we have to iterate!
        final Iterator<org.quartz.Scheduler> allSchedulersIter = factory.getAllSchedulers().iterator();
        org.quartz.Scheduler s = null;
        while ( s == null && allSchedulersIter.hasNext() ) {
            final org.quartz.Scheduler current = allSchedulersIter.next();
View Full Code Here


            this.scheduler = factory.getScheduler();
        } else {
            final ThreadPool pool = tpm.get(THREAD_POOL_NAME);
            final QuartzThreadPool quartzPool = new QuartzThreadPool(pool);
            final DirectSchedulerFactory factory = DirectSchedulerFactory.getInstance();
            factory.createScheduler(quartzPool, new RAMJobStore());
            this.scheduler = factory.getScheduler();
        }
        this.scheduler.start();
        if ( this.logger.isDebugEnabled() ) {
            this.logger.debug("Scheduler started.");
View Full Code Here

      // If cocoon reloads (or is it the container that reload us?)
      // we cannot create the same scheduler again
      final String runID = new Date().toString().replace(' ', '_');
      final ThreadPool pool = createThreadPool(this.config.getChild("thread-pool"));
      DirectSchedulerFactory.getInstance().createScheduler(DEFAULT_QUARTZ_SCHEDULER_NAME, runID, pool,
                                 new RAMJobStore());
      // scheduler = DirectSchedulerFactory.getInstance().getScheduler(DEFAULT_QUARTZ_SCHEDULER_NAME, runID);
      scheduler = DirectSchedulerFactory.getInstance().getScheduler(DEFAULT_QUARTZ_SCHEDULER_NAME);
    } catch (final SchedulerException se) {
      throw new ConfigurationException("cannot create a quartz scheduler", se);
    }
View Full Code Here

            // If cocoon reloads (or is it the container that reload us?)
            // we cannot create the same scheduler again
            final String runID = new Date().toString().replace(' ', '_');
            final ThreadPool pool = createThreadPool(config.getChild("thread-pool"));
            DirectSchedulerFactory.getInstance().createScheduler(DEFAULT_QUARTZ_SCHEDULER_NAME, runID, pool,
                                                                 new RAMJobStore());
            m_scheduler = DirectSchedulerFactory.getInstance().getScheduler(DEFAULT_QUARTZ_SCHEDULER_NAME, runID);
        } catch (final SchedulerException se) {
            throw new ConfigurationException("cannot create a quartz scheduler", se);
        }
View Full Code Here

            this.scheduler = factory.getScheduler();
        } else {
            final ThreadPool pool = tpm.get(THREAD_POOL_NAME);
            final QuartzThreadPool quartzPool = new QuartzThreadPool(pool);
            final DirectSchedulerFactory factory = DirectSchedulerFactory.getInstance();
            factory.createScheduler(quartzPool, new RAMJobStore());
            this.scheduler = factory.getScheduler();
        }
        this.scheduler.start();
        if ( this.logger.isDebugEnabled() ) {
            this.logger.debug("Scheduler started.");
View Full Code Here

                    getLog().error("Unable to parse " + SYSPROPERTY_QUARTZ_THREADPRIORITY + " as integer. Using default of " + threadPriority);
                }
            }
            ThreadPool threadPool = new SimpleThreadPool(threadCount, threadPriority);
            threadPool.initialize();
            JobStore jobStore = new RAMJobStore();
            DirectSchedulerFactory.getInstance().createScheduler(threadPool, jobStore);
            _quartzScheduler = DirectSchedulerFactory.getInstance().getScheduler();
            _quartzScheduler.start();
        }
        catch (SchedulerException e) {
View Full Code Here

    private JobStore createJobStore(String instanceName, String instanceID, final Configuration configuration)
    throws ConfigurationException {
        String type = configuration.getAttribute("type", "ram");
        if (type.equals("ram")) {
            return new RAMJobStore();
        }

        JobStoreSupport store = null;
        if (type.equals("tx")) {
            store = new QuartzJobStoreTX(getLogger(), this.manager, this.context);
View Full Code Here

    public void createVolatileScheduler(int maxThreads)
        throws SchedulerException {
        SimpleThreadPool threadPool = new SimpleThreadPool(maxThreads,
                Thread.NORM_PRIORITY);
        threadPool.initialize();
        JobStore jobStore = new RAMJobStore();
        this.createScheduler(threadPool, jobStore);

    }
View Full Code Here

    public void createVolatileScheduler(int maxThreads)
        throws SchedulerException {
        SimpleThreadPool threadPool = new SimpleThreadPool(maxThreads,
                Thread.NORM_PRIORITY);
        threadPool.initialize();
        JobStore jobStore = new RAMJobStore();
        this.createScheduler(threadPool, jobStore);
    }
View Full Code Here

     * Initialises the scheduler.
     *
     */
    public void initProvider() throws CronProviderInitialisationException {
        instanceId = UUID.randomUUID();
        final JobStore jobStore = new RAMJobStore();
        final ThreadPool threadPool = new SimpleThreadPool(100, Thread.NORM_PRIORITY);
        try {
            threadPool.initialize();
        } catch (SchedulerConfigException ex) {
            throw new CronProviderInitialisationException("Error initializing Quartz ThreadPool", ex);
View Full Code Here

TOP

Related Classes of org.quartz.simpl.RAMJobStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.