executor
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1128 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
a0e7a295ce
commit
b59b02e81a
|
@ -24,9 +24,10 @@
|
||||||
</New>
|
</New>
|
||||||
|
|
||||||
<!-- Optional Java 5 bounded threadpool with job queue
|
<!-- Optional Java 5 bounded threadpool with job queue
|
||||||
<New class="org.eclipse.thread.concurrent.ThreadPool">
|
<New class="org.eclipse.jetty.util.thread.ExecutorThreadPool">
|
||||||
<Set name="corePoolSize">50</Set>
|
<Arg name="coreSize" type="int">25</Arg>
|
||||||
<Set name="maximumPoolSize">50</Set>
|
<Arg name="maxSize" type="int">50</Arg>
|
||||||
|
<Arg name="maxIdleMs" type="long">30000</Arg>
|
||||||
</New>
|
</New>
|
||||||
-->
|
-->
|
||||||
</Set>
|
</Set>
|
||||||
|
|
|
@ -70,6 +70,16 @@ public class ExecutorThreadPool extends AbstractLifeCycle implements ThreadPool,
|
||||||
:new ArrayBlockingQueue<Runnable>(queueSize))));
|
:new ArrayBlockingQueue<Runnable>(queueSize))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------ */
|
||||||
|
/** constructor.
|
||||||
|
* Wraps an {@link ThreadPoolExecutor} using
|
||||||
|
* an unbounded {@link LinkedBlockingQueue} is used for the jobs queue;
|
||||||
|
*/
|
||||||
|
public ExecutorThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime)
|
||||||
|
{
|
||||||
|
this(new ThreadPoolExecutor(corePoolSize,maximumPoolSize,keepAliveTime,TimeUnit.MILLISECONDS,new LinkedBlockingQueue<Runnable>()));
|
||||||
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
/** constructor.
|
/** constructor.
|
||||||
* Wraps an {@link ThreadPoolExecutor} using
|
* Wraps an {@link ThreadPoolExecutor} using
|
||||||
|
|
|
@ -16,7 +16,6 @@ Values themselves may be configured objects that are created with the
|
||||||
Values are matched to arguments on a best effort approach, but types
|
Values are matched to arguments on a best effort approach, but types
|
||||||
my be specified if a match is not achieved.
|
my be specified if a match is not achieved.
|
||||||
|
|
||||||
$Id: configure_1_3.dtd,v 1.2 2005/10/26 20:48:48 gregwilkins Exp $
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!ENTITY % CONFIG "Set|Get|Put|Call|New|Ref|Array|Map|Property">
|
<!ENTITY % CONFIG "Set|Get|Put|Call|New|Ref|Array|Map|Property">
|
||||||
|
@ -26,6 +25,7 @@ $Id: configure_1_3.dtd,v 1.2 2005/10/26 20:48:48 gregwilkins Exp $
|
||||||
<!ENTITY % IMPLIEDCLASSATTR "class NMTOKEN #IMPLIED" >
|
<!ENTITY % IMPLIEDCLASSATTR "class NMTOKEN #IMPLIED" >
|
||||||
<!ENTITY % CLASSATTR "class NMTOKEN #REQUIRED" >
|
<!ENTITY % CLASSATTR "class NMTOKEN #REQUIRED" >
|
||||||
<!ENTITY % NAMEATTR "name NMTOKEN #REQUIRED" >
|
<!ENTITY % NAMEATTR "name NMTOKEN #REQUIRED" >
|
||||||
|
<!ENTITY % IMPLIEDNAMEATTR "name NMTOKEN #IMPLIED" >
|
||||||
<!ENTITY % DEFAULTATTR "default CDATA #IMPLIED" >
|
<!ENTITY % DEFAULTATTR "default CDATA #IMPLIED" >
|
||||||
<!ENTITY % IDATTR "id NMTOKEN #IMPLIED" >
|
<!ENTITY % IDATTR "id NMTOKEN #IMPLIED" >
|
||||||
<!ENTITY % REQUIREDIDATTR "id NMTOKEN #REQUIRED" >
|
<!ENTITY % REQUIREDIDATTR "id NMTOKEN #REQUIRED" >
|
||||||
|
@ -130,7 +130,7 @@ elements they are added as strings before being converted to any
|
||||||
specified type.
|
specified type.
|
||||||
-->
|
-->
|
||||||
<!ELEMENT Arg ( %VALUE; )* >
|
<!ELEMENT Arg ( %VALUE; )* >
|
||||||
<!ATTLIST Arg %TYPEATTR; >
|
<!ATTLIST Arg %TYPEATTR; %IMPLIEDNAMEATTR; >
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
1
pom.xml
1
pom.xml
|
@ -143,6 +143,7 @@
|
||||||
<module>jetty-rewrite</module>
|
<module>jetty-rewrite</module>
|
||||||
<module>jetty-policy</module>
|
<module>jetty-policy</module>
|
||||||
<module>jetty-start</module>
|
<module>jetty-start</module>
|
||||||
|
<module>jetty-osgi</module>
|
||||||
<module>test-continuation</module>
|
<module>test-continuation</module>
|
||||||
<module>test-continuation-jetty6</module>
|
<module>test-continuation-jetty6</module>
|
||||||
<module>test-jetty-servlet</module>
|
<module>test-jetty-servlet</module>
|
||||||
|
|
Loading…
Reference in New Issue