org.apache.tomcat.util.threads.ThreadPoolExecutor.prestartAllCoreThreads()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.apache.tomcat.util.threads.ThreadPoolExecutor.prestartAllCoreThreads()方法的一些代码示例,展示了ThreadPoolExecutor.prestartAllCoreThreads()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ThreadPoolExecutor.prestartAllCoreThreads()方法的具体详情如下:
包路径:org.apache.tomcat.util.threads.ThreadPoolExecutor
类名称:ThreadPoolExecutor
方法名:prestartAllCoreThreads

ThreadPoolExecutor.prestartAllCoreThreads介绍

暂无

代码示例

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory,
    RejectedExecutionHandler handler) {
  super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory, handler);
  prestartAllCoreThreads();
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler) {
  super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, handler);
  prestartAllCoreThreads();
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) {
  super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, new RejectHandler());
  prestartAllCoreThreads();
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory) {
  super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory, new RejectHandler());
  prestartAllCoreThreads();
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Start the component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  taskqueue = new TaskQueue(maxQueueSize);
  TaskThreadFactory tf = new TaskThreadFactory(namePrefix,daemon,getThreadPriority());
  executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
  if (prestartminSpareThreads) {
    executor.prestartAllCoreThreads();
  }
  taskqueue.setParent(executor);
  setState(LifecycleState.STARTING);
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Start the component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  taskqueue = new TaskQueue(maxQueueSize);
  TaskThreadFactory tf = new TaskThreadFactory(namePrefix,daemon,getThreadPriority());
  executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
  if (prestartminSpareThreads) {
    executor.prestartAllCoreThreads();
  }
  taskqueue.setParent(executor);
  setState(LifecycleState.STARTING);
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Start the component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  taskqueue = new TaskQueue(maxQueueSize);
  TaskThreadFactory tf = new TaskThreadFactory(namePrefix,daemon,getThreadPriority());
  executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
  if (prestartminSpareThreads) {
    executor.prestartAllCoreThreads();
  }
  taskqueue.setParent(executor);
  setState(LifecycleState.STARTING);
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Start the component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  taskqueue = new TaskQueue(maxQueueSize);
  TaskThreadFactory tf = new TaskThreadFactory(namePrefix,daemon,getThreadPriority());
  executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
  if (prestartminSpareThreads) {
    executor.prestartAllCoreThreads();
  }
  taskqueue.setParent(executor);
  setState(LifecycleState.STARTING);
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Start the component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  taskqueue = new TaskQueue(maxQueueSize);
  TaskThreadFactory tf = new TaskThreadFactory(namePrefix,daemon,getThreadPriority());
  executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
  if (prestartminSpareThreads) {
    executor.prestartAllCoreThreads();
  }
  taskqueue.setParent(executor);
  setState(LifecycleState.STARTING);
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Start the component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  taskqueue = new TaskQueue(maxQueueSize);
  TaskThreadFactory tf = new TaskThreadFactory(namePrefix,daemon,getThreadPriority());
  executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
  if (prestartminSpareThreads) {
    executor.prestartAllCoreThreads();
  }
  taskqueue.setParent(executor);
  setState(LifecycleState.STARTING);
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * Start the component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  taskqueue = new TaskQueue(maxQueueSize);
  TaskThreadFactory tf = new TaskThreadFactory(namePrefix,daemon,getThreadPriority());
  executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
  executor.setThreadRenewalDelay(threadRenewalDelay);
  if (prestartminSpareThreads) {
    executor.prestartAllCoreThreads();
  }
  taskqueue.setParent(executor);
  setState(LifecycleState.STARTING);
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Start the component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  taskqueue = new TaskQueue(maxQueueSize);
  TaskThreadFactory tf = new TaskThreadFactory(namePrefix,daemon,getThreadPriority());
  executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
  executor.setThreadRenewalDelay(threadRenewalDelay);
  if (prestartminSpareThreads) {
    executor.prestartAllCoreThreads();
  }
  taskqueue.setParent(executor);
  setState(LifecycleState.STARTING);
}

相关文章