Package edu.emory.mathcs.backport.java.util.concurrent

Examples of edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue


      // Support async execution of tasks
      // this.blockingQueue = new SynchronousQueue(); // has no capacity but
      // blocks until other thread takes it out
      final int capacity = 10000;
      this.blockingQueue = new LinkedBlockingQueue(capacity);
      Consumer c = new Consumer(this.blockingQueue);
      Thread t = new Thread(c);
      t.setName("XmlBlaster.Consumer");
      t.setDaemon(true);
      t.start();
View Full Code Here


    public DefaultArtifactResolver()
    {
        super();
        resolveArtifactPool =
            new ThreadPoolExecutor( DEFAULT_POOL_SIZE, DEFAULT_POOL_SIZE, 3, TimeUnit.SECONDS,
                                    new LinkedBlockingQueue() );
    }
View Full Code Here

        }
    }

    protected synchronized LinkedBlockingQueue getMessageQueue(){
        if(messageQueue==null){
            messageQueue=new LinkedBlockingQueue(this.asyncQueueDepth);
        }
        return messageQueue;
    }
View Full Code Here

        if( !started.compareAndSet(false, true) )
            return;
       
        longTermPersistence.setUseExternalMessageReferences(false);

        checkpointExecutor = new ThreadPoolExecutor(maxCheckpointWorkers, maxCheckpointWorkers, 30, TimeUnit.SECONDS, new LinkedBlockingQueue(), new ThreadFactory() {
            public Thread newThread(Runnable runable) {
                Thread t = new Thread(runable, "Journal checkpoint worker");
                t.setPriority(7);
                return t;
            }           
View Full Code Here

    public synchronized void start() throws Exception {
        if( !started.compareAndSet(false, true) )
            return;
       
        checkpointExecutor = new ThreadPoolExecutor(maxCheckpointWorkers, maxCheckpointWorkers, 30, TimeUnit.SECONDS, new LinkedBlockingQueue(), new ThreadFactory() {
            public Thread newThread(Runnable runable) {
                Thread t = new Thread(runable, "Journal checkpoint worker");
                t.setPriority(7);
                return t;
            }           
View Full Code Here

        if( !started.compareAndSet(false, true) )
            return;
       
        longTermPersistence.setUseExternalMessageReferences(true);

        checkpointExecutor = new ThreadPoolExecutor(maxCheckpointWorkers, maxCheckpointWorkers, 30, TimeUnit.SECONDS, new LinkedBlockingQueue(), new ThreadFactory() {
            public Thread newThread(Runnable runable) {
                Thread t = new Thread(runable, "Journal checkpoint worker");
                t.setPriority(7);
                return t;
            }           
View Full Code Here

        this.transport = transport;
        this.clientIdGenerator = clientIdGenerator;
        this.factoryStats = factoryStats;
       
        // Configure a single threaded executor who's core thread can timeout if idle
        asyncConnectionThread = new ThreadPoolExecutor(1,1,5,TimeUnit.SECONDS, new LinkedBlockingQueue(), new ThreadFactory() {
            public Thread newThread(Runnable r) {
                Thread thread = new Thread(r, "AcitveMQ Connection Worker: "+transport);
                thread.setDaemon(true);
                return thread;
            }});
View Full Code Here

     * @param threadPriority priority for the threads.
     */
    public ThreadFiringStatsRecorder(int initialThreads, int maxThreads, int threadPriority) {
        this.threadPool
            = new ThreadPoolExecutor(initialThreads, maxThreads, 0L,
                    TimeUnit.MILLISECONDS, new LinkedBlockingQueue(),
                    new PriorityThreadFactory(threadPriority));
   
View Full Code Here

    public void start() throws AxisFault {
        // create thread pool of workers
        workerPool = new ThreadPoolExecutor(
                1,
                WORKERS_MAX_THREADS, WORKER_KEEP_ALIVE, TIME_UNIT,
                new LinkedBlockingQueue(),
                new org.apache.axis2.util.threadpool.DefaultThreadFactory(
                        new ThreadGroup("JMS Worker thread group"),
                        "JMSWorker"));

        Iterator iter = connectionFactories.values().iterator();
View Full Code Here

    /**
     * Create the executor used to launch the single requestConnectionListener
     */
    public ExecutorService newListenerExecutor(int port) {
        return new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS,
                                      new LinkedBlockingQueue(),
                                      new DefaultThreadFactory(
                                              new ThreadGroup("Listener thread group"),
                                              "HttpListener-" + this.port));
    }
View Full Code Here

TOP

Related Classes of edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue

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.