Package org.quartz.simpl

Examples of org.quartz.simpl.RAMJobStore


     *
     */
    public void initProvider() throws CronProviderInitialisationException {
        try {
            instanceId = UUID.randomUUID();
            JobStore jobStore = new RAMJobStore();
            ThreadPool threadPool = new SimpleThreadPool(4, Thread.NORM_PRIORITY);
            threadPool.initialize();
            final DirectSchedulerFactory schedulerFactory = DirectSchedulerFactory.getInstance();
            schedulerName = SCHEDULER_NAME_PREFIX + "_" + instanceId.toString();
            schedulerFactory.createScheduler(schedulerName, instanceId.toString(), threadPool, jobStore);
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

    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

    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

            // 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

    public void configure(final Configuration config)
    throws ConfigurationException {
        final ThreadPool pool = createThreadPool(config.getChild("thread-pool"));

        try {
            DirectSchedulerFactory.getInstance().createScheduler(pool, new RAMJobStore());
            m_scheduler = DirectSchedulerFactory.getInstance().getScheduler();
        } catch (final SchedulerException se) {
            throw new ConfigurationException("cannot create a quartz scheduler", se);
        }
View Full Code Here

/*     */     throws SchedulerException
/*     */   {
/* 160 */     SimpleThreadPool threadPool = new SimpleThreadPool(maxThreads, 5);
/*     */
/* 162 */     threadPool.initialize();
/* 163 */     JobStore jobStore = new RAMJobStore();
/* 164 */     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

        System.setProperty("org.terracotta.quartz.skipUpdateCheck", Boolean.TRUE.toString());

        final DirectSchedulerFactory factory = DirectSchedulerFactory.getInstance();
        // unique run id
        final String runID = new Date().toString().replace(' ', '_');
        factory.createScheduler(QUARTZ_SCHEDULER_NAME, runID, threadPool, 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();
        while ( scheduler == null && allSchedulersIter.hasNext() ) {
            final org.quartz.Scheduler current = allSchedulersIter.next();
            if ( QUARTZ_SCHEDULER_NAME.equals(current.getSchedulerName())
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

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.