Package org.apache.tomcat.util.collections

Examples of org.apache.tomcat.util.collections.SimplePool


    static final boolean usePool=false;
   
    public TcpWorkerThread(PoolTcpEndpoint endpoint) {
  this.endpoint = endpoint;
  if( usePool ) {
      connectionCache = new SimplePool(endpoint.getMaxThreads());
      for(int i = 0 ; i < endpoint.getMaxThreads()/2 ; i++) {
    connectionCache.put(new TcpConnection());
      }
  }
    }
View Full Code Here


    static final boolean usePool=true;
   
    public TcpWorkerThread(PoolTcpEndpoint endpoint) {
  this.endpoint = endpoint;
  if( usePool ) {
      connectionCache = new SimplePool(endpoint.getMaxThreads());
      for(int i = 0 ; i < endpoint.getMaxThreads()/2 ; i++) {
    connectionCache.put(new TcpConnection());
      }
  }
    }
View Full Code Here

  // without it we would need a priviledged action.
  JspWriterImpl.lineSeparator=lineSeparator;
    }

    public JspFactoryImpl() {
  pool=new SimplePool( DEFAULT_POOL_SIZE );
  usePool=true;
    }
View Full Code Here

    public JspFactoryImpl( int size ) {
  if( size==0 ) {
      pool=null;
      usePool=false;
  } else {
      pool=new SimplePool( size );
  }
    }
View Full Code Here

    static final boolean usePool=true;
   
    public TcpWorkerThread(PoolTcpEndpoint endpoint) {
  this.endpoint = endpoint;
  if( usePool ) {
      connectionCache = new SimplePool(endpoint.getMaxThreads());
      for(int i = 0 ; i < endpoint.getMaxThreads()/2 ; i++) {
    connectionCache.put(new TcpConnection());
      }
  }
    }
View Full Code Here

  }
 
  servlet = (Servlet)servletClass.newInstance();
  if (useStmPool && ( servlet instanceof SingleThreadModel )) {
      if(stmPool == null){
    stmPool = new SimplePool(stmPoolSize);
      }
      stmPool.put(servlet);
      stmInstances++;
  }
  return servlet;
View Full Code Here

  // without it we would need a priviledged action.
  JspWriterImpl.lineSeparator=lineSeparator;
    }

    public JspFactoryImpl() {
  pool=new SimplePool( DEFAULT_POOL_SIZE );
  usePool=true;
    }
View Full Code Here

    public JspFactoryImpl( int size ) {
  if( size==0 ) {
      pool=null;
      usePool=false;
  } else {
      pool=new SimplePool( size );
  }
    }
View Full Code Here

    static final boolean usePool=false;
   
    public TcpWorkerThread(PoolTcpEndpoint endpoint) {
  this.endpoint = endpoint;
  if( usePool ) {
      connectionCache = new SimplePool(endpoint.getMaxThreads());
      for(int i = 0 ; i < endpoint.getMaxThreads()/2 ; i++) {
    connectionCache.put(new TcpConnection());
      }
  }
    }
View Full Code Here

    static final boolean usePool=false;
   
    public TcpWorkerThread(PoolTcpEndpoint endpoint) {
  this.endpoint = endpoint;
  if( usePool ) {
      connectionCache = new SimplePool(endpoint.getMaxThreads());
      for(int i = 0 ; i < endpoint.getMaxThreads()/2 ; i++) {
    connectionCache.put(new TcpConnection());
      }
  }
    }
View Full Code Here

TOP

Related Classes of org.apache.tomcat.util.collections.SimplePool

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.