Examples of BoundedBuffer


Examples of EDU.oswego.cs.dl.util.concurrent.BoundedBuffer

    private void createBoundedThreadPool(final int threadPoolMaxSize,
                                         final int threadPoolMinSize,
                                         final int threadPoolInitSize,
                                         final int keepAliveTime,
                                         final boolean waitWhenBlocked) {
        m_threadPool = new PooledExecutor(new BoundedBuffer(threadPoolInitSize), threadPoolMaxSize);
        m_threadPool.setKeepAliveTime(keepAliveTime);
        m_threadPool.createThreads(threadPoolInitSize);
        m_threadPool.setMinimumPoolSize(threadPoolMinSize);
        if (waitWhenBlocked) {
            m_threadPool.waitWhenBlocked();
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.BoundedBuffer

                    }
                    else {
                        // have thread per channel for sending messages and a thread for receiving them
                        PooledExecutor executor = null;
                        if (useAsyncSend) {
                            executor = new PooledExecutor(new BoundedBuffer(maxOutstandingMessages), 1);
                        }
                        TcpTransportChannel channel = new TcpTransportChannel(wireFormat.copy(), socket, executor);
                        addClient(channel);
                    }
                }
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.BoundedBuffer

        started = new SynchronizedBoolean(false);
        // there's not much point logging all exceptions, lets just keep a few around
        exceptionsList = new BoundedLinkedQueue(10);
        outboundLock = new Object();
        if (useAsyncSend) {
            executor = new PooledExecutor(new BoundedBuffer(1000), 1);
        }
        super.setCachingEnabled(true);
    }
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.BoundedBuffer

                                         final int threadPoolMinSize,
                                         final int threadPoolInitSize,
                                         final int keepAliveTime,
                                         final boolean waitWhenBlocked) {
        m_threadPool = new PooledExecutor(
                new BoundedBuffer(threadPoolInitSize),
                threadPoolMaxSize
        );
        m_threadPool.setKeepAliveTime(keepAliveTime);
        m_threadPool.createThreads(threadPoolInitSize);
        m_threadPool.setMinimumPoolSize(threadPoolMinSize);
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.BoundedBuffer

            final int threadPoolMaxSize,
            final int threadPoolMinSize,
            final int threadPoolInitSize,
            final int keepAliveTime,
            final boolean waitWhenBlocked) {
        m_threadPool = new PooledExecutor(new BoundedBuffer(threadPoolInitSize), threadPoolMaxSize);
        m_threadPool.setKeepAliveTime(keepAliveTime);
        m_threadPool.createThreads(threadPoolInitSize);
        m_threadPool.setMinimumPoolSize(threadPoolMinSize);
        if (waitWhenBlocked) m_threadPool.waitWhenBlocked();
    }
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.BoundedBuffer

        closed = new SynchronizedBoolean(false);
        started = new SynchronizedBoolean(false);
        outboundLock = new Object();
        if (useAsyncSend) {
            executor = new PooledExecutor(new BoundedBuffer(1000), 1);
        }
    }
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.BoundedBuffer

                socket = serverSocket.accept();
                if (socket != null) {
                    // have thread per channel for sending messages and a thread for receiving them
                    PooledExecutor executor = null;
                    if (useAsyncSend) {
                        executor = new PooledExecutor(new BoundedBuffer(maxOutstandingMessages), 1);
                    }
                    TcpTransportChannel channel = new TcpTransportChannel(wireFormat, socket, executor);
                    addClient(channel);
                }
            }
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.BoundedBuffer

        started = new SynchronizedBoolean(false);
        // there's not much point logging all exceptions, lets just keep a few around
        exceptionsList = new BoundedLinkedQueue(10);
        outboundLock = new Object();
        if (useAsyncSend) {
            executor = new PooledExecutor(new BoundedBuffer(1000), 1);
        }
    }
View Full Code Here

Examples of org.apache.turbine.util.pool.BoundedBuffer

         *
         * @param capacity a capacity.
         */
        public PoolBuffer(int capacity)
        {
            pool = new BoundedBuffer(capacity);
        }
View Full Code Here

Examples of org.apache.turbine.util.pool.BoundedBuffer

         *
         * @param capacity a capacity.
         */
        public PoolBuffer(int capacity)
        {
            pool = new BoundedBuffer(capacity);
        }
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.