Package EDU.oswego.cs.dl.util.concurrent

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


            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

                    }
                    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);
                            executor.waitWhenBlocked();
                            executor.setKeepAliveTime(1000);
                        }
                        TcpTransportChannel channel = createTransportChannel(socket, executor);
                        addClient(channel);
View Full Code Here

     */   
     public void setUseAsyncSend(boolean useAsyncSend) {
        this.useAsyncSend = useAsyncSend;
        try {
            if (useAsyncSend && executor==null ) {
                PooledExecutor pe = new PooledExecutor(new BoundedBuffer(10), 1);
                pe.waitWhenBlocked();
                pe.setKeepAliveTime(1000);
                executor = pe;
            }
            else if (!useAsyncSend && executor != null) {
View Full Code Here

            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

            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

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

                                         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

            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

            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

TOP

Related Classes of EDU.oswego.cs.dl.util.concurrent.BoundedBuffer

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.