StandardThreadExecutor (Apache Tomcat 6.0.51 API Documentation)
Keywords: org.apache.catalina.core.StandardThreadExecutor class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.core
Class StandardThreadExecutor

    java.lang.Object
      org.apache.catalina.core.StandardThreadExecutor

All Implemented Interfaces:
  java.util.concurrent.Executor, Lifecycle

    public class StandardThreadExecutor

extends java.lang.Object
implements Executor

Field Summary
`protected boolean` | `daemon` Run threads in daemon or non-daemon state
`protected java.util.concurrent.ThreadPoolExecutor` | `executor` The executor we use for this component
`protected int` | `maxIdleTime` idle time in milliseconds
`protected int` | `maxQueueSize` The maximum number of elements that can queue up before we reject them
`protected int` | `maxThreads` max number of threads
`protected int` | `minSpareThreads` min number of threads
`protected java.lang.String` | `name` the name of this thread pool
`protected java.lang.String` | `namePrefix` Default name prefix for the thread name
`protected java.util.concurrent.atomic.AtomicInteger` | `submittedTasksCount` Number of tasks submitted and not yet completed.
`protected int` | `threadPriority` Default thread priority

Fields inherited from interface org.apache.catalina.Lifecycle
`AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT`

Constructor Summary
`StandardThreadExecutor()`

Method Summary
`void` | `addLifecycleListener(LifecycleListener listener)` Add a LifecycleEvent listener to this component.
`void` | `execute(java.lang.Runnable command)`
`void` | `execute(java.lang.Runnable command, long timeout, java.util.concurrent.TimeUnit unit)`
`LifecycleListener[]` | `findLifecycleListeners()` Get the lifecycle listeners associated with this lifecycle.
`int` | `getActiveCount()`
`long` | `getCompletedTaskCount()`
`int` | `getCorePoolSize()`
`int` | `getLargestPoolSize()`
`int` | `getMaxIdleTime()`
`int` | `getMaxQueueSize()`
`int` | `getMaxThreads()`
`int` | `getMinSpareThreads()`
`java.lang.String` | `getName()`
`java.lang.String` | `getNamePrefix()`
`int` | `getPoolSize()`
`int` | `getQueueSize()`
`int` | `getThreadPriority()`
`boolean` | `isDaemon()`
`void` | `removeLifecycleListener(LifecycleListener listener)` Remove a LifecycleEvent listener from this component.
`void` | `setDaemon(boolean daemon)`
`void` | `setMaxIdleTime(int maxIdleTime)`
`void` | `setMaxQueueSize(int size)`
`void` | `setMaxThreads(int maxThreads)`
`void` | `setMinSpareThreads(int minSpareThreads)`
`void` | `setName(java.lang.String name)`
`void` | `setNamePrefix(java.lang.String namePrefix)`
`void` | `setThreadPriority(int threadPriority)`
`void` | `start()` Prepare for the beginning of active use of the public methods of this component.
`void` | `stop()` Gracefully terminate the active use of the public methods of this component.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### threadPriority

    protected int threadPriority

  Default thread priority

### daemon

    protected boolean daemon

  Run threads in daemon or non-daemon state

### namePrefix

    protected java.lang.String namePrefix

  Default name prefix for the thread name

### maxThreads

    protected int maxThreads

  max number of threads

### minSpareThreads

    protected int minSpareThreads

  min number of threads

### maxIdleTime

    protected int maxIdleTime

  idle time in milliseconds

### executor

    protected java.util.concurrent.ThreadPoolExecutor executor

  The executor we use for this component

### name

    protected java.lang.String name

  the name of this thread pool

### submittedTasksCount

    protected java.util.concurrent.atomic.AtomicInteger submittedTasksCount

  Number of tasks submitted and not yet completed.

### maxQueueSize

    protected int maxQueueSize

  The maximum number of elements that can queue up before we reject them

Constructor Detail

### StandardThreadExecutor

    public StandardThreadExecutor()

Method Detail

### start

    public void start()
               throws LifecycleException

  Description copied from interface: `Lifecycle`
  Prepare for the beginning of active use of the public methods of this component. This method should be called before any of the public methods of this component are utilized. It should also send a LifecycleEvent of type START_EVENT to any registered listeners.

  Specified by:
    `start` in interface `Lifecycle`
  Throws:
    `LifecycleException` - if this component detects a fatal error that prevents this component from being used

### stop

    public void stop()
              throws LifecycleException

  Description copied from interface: `Lifecycle`
  Gracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component. It should also send a LifecycleEvent of type STOP_EVENT to any registered listeners.

  Specified by:
    `stop` in interface `Lifecycle`
  Throws:
    `LifecycleException` - if this component detects a fatal error that needs to be reported

### execute

    public void execute(java.lang.Runnable command,
                        long timeout,
                        java.util.concurrent.TimeUnit unit)

### execute

    public void execute(java.lang.Runnable command)

  Specified by:
    `execute` in interface `java.util.concurrent.Executor`

### getThreadPriority

    public int getThreadPriority()

### isDaemon

    public boolean isDaemon()

### getNamePrefix

    public java.lang.String getNamePrefix()

### getMaxIdleTime

    public int getMaxIdleTime()

### getMaxThreads

    public int getMaxThreads()

### getMinSpareThreads

    public int getMinSpareThreads()

### getName

    public java.lang.String getName()

### setThreadPriority

    public void setThreadPriority(int threadPriority)

### setDaemon

    public void setDaemon(boolean daemon)

### setNamePrefix

    public void setNamePrefix(java.lang.String namePrefix)

### setMaxIdleTime

    public void setMaxIdleTime(int maxIdleTime)

### setMaxThreads

    public void setMaxThreads(int maxThreads)

### setMinSpareThreads

    public void setMinSpareThreads(int minSpareThreads)

### setName

    public void setName(java.lang.String name)

### setMaxQueueSize

    public void setMaxQueueSize(int size)

### getMaxQueueSize

    public int getMaxQueueSize()

### addLifecycleListener

    public void addLifecycleListener(LifecycleListener listener)

  Add a LifecycleEvent listener to this component.

  Specified by:
    `addLifecycleListener` in interface `Lifecycle`
  Parameters:
    `listener` - The listener to add

### findLifecycleListeners

    public LifecycleListener[] findLifecycleListeners()

  Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a zero-length array is returned.

  Specified by:
    `findLifecycleListeners` in interface `Lifecycle`

### removeLifecycleListener

    public void removeLifecycleListener(LifecycleListener listener)

  Remove a LifecycleEvent listener from this component.

  Specified by:
    `removeLifecycleListener` in interface `Lifecycle`
  Parameters:
    `listener` - The listener to remove

### getActiveCount

    public int getActiveCount()

### getCompletedTaskCount

    public long getCompletedTaskCount()

### getCorePoolSize

    public int getCorePoolSize()

### getLargestPoolSize

    public int getLargestPoolSize()

### getPoolSize

    public int getPoolSize()

### getQueueSize

    public int getQueueSize()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.