org.apache.catalina.core

Class StandardThreadExecutor

public class StandardThreadExecutor extends Object implements Executor

Field Summary
protected booleandaemon
protected ThreadPoolExecutorexecutor
protected intmaxIdleTime
protected intmaxThreads
protected intminSpareThreads
protected Stringname
protected StringnamePrefix
protected intthreadPriority
Constructor Summary
StandardThreadExecutor()
Method Summary
voidaddLifecycleListener(LifecycleListener listener)
Add a LifecycleEvent listener to this component.
voidexecute(Runnable command)
LifecycleListener[]findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle.
intgetActiveCount()
longgetCompletedTaskCount()
intgetCorePoolSize()
intgetLargestPoolSize()
intgetMaxIdleTime()
intgetMaxThreads()
intgetMinSpareThreads()
StringgetName()
StringgetNamePrefix()
intgetPoolSize()
intgetQueueSize()
intgetThreadPriority()
booleanisDaemon()
voidremoveLifecycleListener(LifecycleListener listener)
Remove a LifecycleEvent listener from this component.
voidsetDaemon(boolean daemon)
voidsetMaxIdleTime(int maxIdleTime)
voidsetMaxThreads(int maxThreads)
voidsetMinSpareThreads(int minSpareThreads)
voidsetName(String name)
voidsetNamePrefix(String namePrefix)
voidsetThreadPriority(int threadPriority)
voidstart()
voidstop()

Field Detail

daemon

protected boolean daemon

executor

protected ThreadPoolExecutor executor

maxIdleTime

protected int maxIdleTime

maxThreads

protected int maxThreads

minSpareThreads

protected int minSpareThreads

name

protected String name

namePrefix

protected String namePrefix

threadPriority

protected int threadPriority

Constructor Detail

StandardThreadExecutor

public StandardThreadExecutor()

Method Detail

addLifecycleListener

public void addLifecycleListener(LifecycleListener listener)
Add a LifecycleEvent listener to this component.

Parameters: listener The listener to add

execute

public void execute(Runnable command)

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.

getActiveCount

public int getActiveCount()

getCompletedTaskCount

public long getCompletedTaskCount()

getCorePoolSize

public int getCorePoolSize()

getLargestPoolSize

public int getLargestPoolSize()

getMaxIdleTime

public int getMaxIdleTime()

getMaxThreads

public int getMaxThreads()

getMinSpareThreads

public int getMinSpareThreads()

getName

public String getName()

getNamePrefix

public String getNamePrefix()

getPoolSize

public int getPoolSize()

getQueueSize

public int getQueueSize()

getThreadPriority

public int getThreadPriority()

isDaemon

public boolean isDaemon()

removeLifecycleListener

public void removeLifecycleListener(LifecycleListener listener)
Remove a LifecycleEvent listener from this component.

Parameters: listener The listener to remove

setDaemon

public void setDaemon(boolean daemon)

setMaxIdleTime

public void setMaxIdleTime(int maxIdleTime)

setMaxThreads

public void setMaxThreads(int maxThreads)

setMinSpareThreads

public void setMinSpareThreads(int minSpareThreads)

setName

public void setName(String name)

setNamePrefix

public void setNamePrefix(String namePrefix)

setThreadPriority

public void setThreadPriority(int threadPriority)

start

public void start()

stop

public void stop()
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.