Examples of LimitLatch


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

    public abstract boolean getUsePolling();

    protected LimitLatch initializeConnectionLatch() {
        if (maxConnections==-1) return null;
        if (connectionLimitLatch==null) {
            connectionLimitLatch = new LimitLatch(getMaxConnections());
        }
        return connectionLimitLatch;
    }
View Full Code Here

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

        }
        return connectionLimitLatch;
    }

    protected void releaseConnectionLatch() {
        LimitLatch latch = connectionLimitLatch;
        if (latch!=null) latch.releaseAll();
        connectionLimitLatch = null;
    }
View Full Code Here

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

        connectionLimitLatch = null;
    }

    protected void countUpOrAwaitConnection() throws InterruptedException {
        if (maxConnections==-1) return;
        LimitLatch latch = connectionLimitLatch;
        if (latch!=null) latch.countUpOrAwait();
    }
View Full Code Here

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

        if (latch!=null) latch.countUpOrAwait();
    }

    protected long countDownConnection() {
        if (maxConnections==-1) return -1;
        LimitLatch latch = connectionLimitLatch;
        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

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

    // ----------------------------------------------------------------- Properties

    private int maxConnections = 10000;
    public void setMaxConnections(int maxCon) {
        this.maxConnections = maxCon;
        LimitLatch latch = this.connectionLimitLatch;
        if (latch != null) {
            // Update the latch that enforces this
            latch.setLimit(maxCon);
        }
    }
View Full Code Here

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

    public abstract boolean getUseComet();
    public abstract boolean getUseCometTimeout();
   
    protected LimitLatch initializeConnectionLatch() {
        if (connectionLimitLatch==null) {
            connectionLimitLatch = new LimitLatch(getMaxConnections());
        }
        return connectionLimitLatch;
    }
View Full Code Here

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

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

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

        if (latch!=null) latch.releaseAll();
        connectionLimitLatch = null;
    }
   
    protected void countUpOrAwaitConnection() throws InterruptedException {
        LimitLatch latch = connectionLimitLatch;
        if (latch!=null) latch.countUpOrAwait();
    }
View Full Code Here

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

        LimitLatch latch = connectionLimitLatch;
        if (latch!=null) latch.countUpOrAwait();
    }
   
    protected long countDownConnection() {
        LimitLatch latch = connectionLimitLatch;
        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

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


    private int maxConnections = 10000;
    public void setMaxConnections(int maxCon) {
        this.maxConnections = maxCon;
        LimitLatch latch = this.connectionLimitLatch;
        if (latch != null) {
            // Update the latch that enforces this
            latch.setLimit(maxCon);
        }
    }
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.