Package org.apache.activemq.thread

Examples of org.apache.activemq.thread.Scheduler


        this.stats = new JMSConnectionStatsImpl(sessions, this instanceof XAConnection);
        this.factoryStats.addConnection(this);
        this.timeCreated = System.currentTimeMillis();
        this.connectionAudit.setCheckForDuplicates(transport.isFaultTolerant());
        this.scheduler = new Scheduler("ActiveMQConnection["+uniqueId+"] Scheduler");
        this.scheduler.start();
    }
View Full Code Here


        return this.executor;
    }
   
    protected 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);
            }
View Full Code Here

        return this.executor;
    }

    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);
            }
View Full Code Here

        longTermPersistence.start();
        createTransactionStore();
        recover();

        // Do a checkpoint periodically.
        this.scheduler = new Scheduler("Journal Scheduler");
        this.scheduler.start();
        this.scheduler.executePeriodically(periodicCheckpointTask, checkpointInterval / 10);

    }
View Full Code Here

                });
                this.pageFile.flush();

                if (cleanupInterval > 0) {
                    if (scheduler == null) {
                        scheduler = new Scheduler(PListStore.class.getSimpleName());
                        scheduler.start();
                    }
                    scheduler.executePeriodically(this, cleanupInterval);
                }
                this.initialized = true;
View Full Code Here

                    if (advisoryConsumer != null) {
                        advisoryConsumer.dispose();
                        advisoryConsumer = null;
                    }

                    Scheduler scheduler = this.scheduler;
                    if (scheduler != null) {
                        try {
                            scheduler.stop();
                        } catch (Exception e) {
                            JMSException ex =  JMSExceptionSupport.create(e);
                            throw ex;
                        }
                    }
View Full Code Here

        started.set(false);
    }

    public void finalize() throws Throwable{
        Scheduler s = this.scheduler;
        if (s != null){
            s.stop();
        }
    }
View Full Code Here

    public long getConsumerFailoverRedeliveryWaitPeriod() {
        return consumerFailoverRedeliveryWaitPeriod;
    }

    protected Scheduler getScheduler() throws JMSException {
        Scheduler result = scheduler;
        if (result == null) {
            synchronized (this) {
                result = scheduler;
                if (result == null) {
                    checkClosed();
                    try {
                        result = scheduler = new Scheduler("ActiveMQConnection["+info.getConnectionId().getValue()+"] Scheduler");
                        scheduler.start();
                    } catch(Exception e) {
                        throw JMSExceptionSupport.create(e);
                    }
                }
View Full Code Here

            this.taskRunnerFactory = this.brokerService.getTaskRunnerFactory();
            this.scheduler = this.brokerService.getScheduler();
        } else {
            this.taskRunnerFactory = new TaskRunnerFactory("AMQPersistenceAdaptor Task", getJournalThreadPriority(),
                true, 1000, isUseDedicatedTaskRunner());
            this.scheduler = new Scheduler("AMQPersistenceAdapter Scheduler");
        }

        IOHelper.mkdirs(this.directory);
        lockFile = new RandomAccessFile(new File(directory, "lock"), "rw");
        lock();
View Full Code Here

        this.stats = new JMSConnectionStatsImpl(sessions, this instanceof XAConnection);
        this.factoryStats.addConnection(this);
        this.timeCreated = System.currentTimeMillis();
        this.connectionAudit.setCheckForDuplicates(transport.isFaultTolerant());
        this.scheduler = new Scheduler("ActiveMQConnection["+uniqueId+"] Scheduler");
        this.scheduler.start();
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.thread.Scheduler

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.