Package org.apache.activemq.thread

Examples of org.apache.activemq.thread.Scheduler


        cleanupTask = new Runnable() {
            public void run() {
                cleanup();
            }
        };
        this.scheduler = new Scheduler("AsyncDataManager Scheduler");
        try {
            this.scheduler.start();
        } catch (Exception e) {
            IOException ioe =  new IOException("scheduler start: " + e);
            ioe.initCause(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

                    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);
    }

    @Override
    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

        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

                    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);
    }

    @Override
    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

                    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

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.