Examples of TaskRunnerFactory


Examples of org.apache.activemq.thread.TaskRunnerFactory

        this.taskRunnerFactory = taskRunnerFactory;
    }

    public TaskRunnerFactory getPersistenceTaskRunnerFactory() {
        if (taskRunnerFactory == null) {
            persistenceTaskRunnerFactory = new TaskRunnerFactory("Persistence Adaptor Task", persistenceThreadPriority,
                    true, 1000, isDedicatedTaskRunner());
        }
        return persistenceTaskRunnerFactory;
    }
View Full Code Here

Examples of org.apache.activemq.thread.TaskRunnerFactory

        if (this.brokerService != null) {
            this.taskRunnerFactory = this.brokerService.getTaskRunnerFactory();
        }else {
            this.scheduler = new Scheduler("AMQPersistenceAdapter Scheduler");
        }
        this.taskRunnerFactory= new TaskRunnerFactory("AMQPersistenceAdaptor Task", getJournalThreadPriority(),
                true, 1000, isUseDedicatedTaskRunner());
        IOHelper.mkdirs(this.directory);
        lockFile = new RandomAccessFile(new File(directory, "lock"), "rw");
        lock();
        LOG.info("AMQStore starting using directory: " + directory);
View Full Code Here

Examples of org.apache.activemq.thread.TaskRunnerFactory

        this.persistenceAdapter = registerPersistenceAdapterMBean(persistenceAdapter);
    }

    public TaskRunnerFactory getTaskRunnerFactory() {
        if (this.taskRunnerFactory == null) {
            this.taskRunnerFactory = new TaskRunnerFactory("BrokerService["+getBrokerName()+"] Task", getTaskRunnerPriority(), true, 1000,
                    isDedicatedTaskRunner());
        }
        return this.taskRunnerFactory;
    }
View Full Code Here

Examples of org.apache.activemq.thread.TaskRunnerFactory

        this.useJournal = useJournal;
    }

    public TaskRunnerFactory getTaskRunnerFactory() {
        if( taskRunnerFactory == null ) {
            taskRunnerFactory = new TaskRunnerFactory("Persistence Adaptor Task", journalThreadPriority, true, 1000);
        }
        return taskRunnerFactory;
    }
View Full Code Here

Examples of org.apache.activemq.thread.TaskRunnerFactory

        final AtomicInteger counter = new AtomicInteger(0);
        final AtomicInteger queue = new AtomicInteger(0);
        final CountDownLatch doneCountDownLatch = new CountDownLatch(1);
        final int ENQUEUE_COUNT = 100000;
       
        TaskRunnerFactory factory = new TaskRunnerFactory();       
        final TaskRunner runner = factory.createTaskRunner(new Task() {           
            public boolean iterate() {
                if( queue.get()==0 ) {
                    return false;
                } else {
                    while(queue.get()>0) {
View Full Code Here

Examples of org.apache.activemq.thread.TaskRunnerFactory

        this.persistenceAdapter = persistenceAdapter;
    }

    public TaskRunnerFactory getTaskRunnerFactory() {
        if (taskRunnerFactory == null) {
            taskRunnerFactory = new TaskRunnerFactory();
        }
        return taskRunnerFactory;
    }
View Full Code Here

Examples of org.apache.activemq.thread.TaskRunnerFactory

    }
   
   
    public TaskRunnerFactory getPersistenceTaskRunnerFactory(){
        if (taskRunnerFactory == null) {
            persistenceTaskRunnerFactory = new TaskRunnerFactory("Persistence Adaptor Task", persistenceThreadPriority, true, 1000);
        }
        return persistenceTaskRunnerFactory;
    }
View Full Code Here

Examples of org.apache.activemq.thread.TaskRunnerFactory

    }

    public TaskRunnerFactory getSessionTaskRunner() {
        synchronized (this) {
            if (sessionTaskRunner == null) {
                sessionTaskRunner = new TaskRunnerFactory("ActiveMQ Session Task", ThreadPriorities.INBOUND_CLIENT_SESSION, false, 1000, isUseDedicatedTaskRunner());
            }
        }
        return sessionTaskRunner;
    }
View Full Code Here

Examples of org.apache.activemq.thread.TaskRunnerFactory

        this.taskRunnerFactory = taskRunnerFactory;
    }

    public TaskRunnerFactory getPersistenceTaskRunnerFactory() {
        if (taskRunnerFactory == null) {
            persistenceTaskRunnerFactory = new TaskRunnerFactory("Persistence Adaptor Task", persistenceThreadPriority,
                    true, 1000, isDedicatedTaskRunner());
        }
        return persistenceTaskRunnerFactory;
    }
View Full Code Here

Examples of org.apache.activemq.thread.TaskRunnerFactory

                }
            }
        };

        nc.setDiscoveryAgent(new DiscoveryAgent() {
            TaskRunnerFactory taskRunner = new TaskRunnerFactory();
            DiscoveryListener listener;

            @Override
            public void start() throws Exception {
                taskRunner.init();
                taskRunner.execute(new Runnable() {
                    @Override
                    public void run() {
                        listener.onServiceAdd(new DiscoveryEvent(broker2
                                .getVmConnectorURI().toString()));
                    }
                });
                taskRunner.execute(new Runnable() {
                    @Override
                    public void run() {
                        listener.onServiceAdd(new DiscoveryEvent(broker2
                                .getVmConnectorURI().toString()));
                    }
                });
            }

            @Override
            public void stop() throws Exception {
                taskRunner.shutdown();
            }

            @Override
            public void setDiscoveryListener(DiscoveryListener listener) {
                this.listener = listener;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.