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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
threadPriority
protected int threadPriority
daemon
protected boolean daemon
namePrefix
protected java.lang.String namePrefix
maxThreads
protected int maxThreads
minSpareThreads
protected int minSpareThreads
maxIdleTime
protected int maxIdleTime
executor
protected java.util.concurrent.ThreadPoolExecutor executor
name
protected java.lang.String name
StandardThreadExecutor
public StandardThreadExecutor()
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)
- 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)
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()
Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.