Package org.apache.tomcat.util.threads

Examples of org.apache.tomcat.util.threads.CounterLatch


    protected abstract Log getLog();
    public abstract boolean getUseSendfile();
   
    protected CounterLatch initializeConnectionLatch() {
        if (connectionCounterLatch==null) {
            connectionCounterLatch = new CounterLatch(0,getMaxConnections());
        }
        return connectionCounterLatch;
    }
View Full Code Here


        }
        return connectionCounterLatch;
    }
   
    protected void releaseConnectionLatch() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) latch.releaseAll();
        connectionCounterLatch = null;
    }
View Full Code Here

        if (latch!=null) latch.releaseAll();
        connectionCounterLatch = null;
    }
   
    protected void awaitConnection() throws InterruptedException {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) latch.await();
    }
View Full Code Here

        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) latch.await();
    }
   
    protected long countUpConnection() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) return latch.countUp();
        else return -1;
    }
View Full Code Here

        if (latch!=null) return latch.countUp();
        else return -1;
    }
   
    protected long countDownConnection() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) {
            long result = latch.countDown();
            if (result<0) {
                getLog().warn("Incorrect connection count, multiple socket.close called on the same socket." );
            }
            return result;
        } else return -1;
View Full Code Here

    protected abstract Log getLog();
    public abstract boolean getUseSendfile();
   
    protected CounterLatch initializeConnectionLatch() {
        if (connectionCounterLatch==null) {
            connectionCounterLatch = new CounterLatch(0,getMaxConnections());
        }
        return connectionCounterLatch;
    }
View Full Code Here

        }
        return connectionCounterLatch;
    }
   
    protected void releaseConnectionLatch() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) latch.releaseAll();
        connectionCounterLatch = null;
    }
View Full Code Here

        if (latch!=null) latch.releaseAll();
        connectionCounterLatch = null;
    }
   
    protected void awaitConnection() throws InterruptedException {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) latch.await();
    }
View Full Code Here

        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) latch.await();
    }
   
    protected long countUpConnection() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) return latch.countUp();
        else return -1;
    }
View Full Code Here

        if (latch!=null) return latch.countUp();
        else return -1;
    }
   
    protected long countDownConnection() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) {
            long result = latch.countDown();
            if (result<0) {
                getLog().warn("Incorrect connection count, multiple socket.close called on the same socket." );
            }
            return result;
        } else return -1;
View Full Code Here

TOP

Related Classes of org.apache.tomcat.util.threads.CounterLatch

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.