Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Programs that use multiple threads to serve service requests should — and programs that may be subjected to DoS attacks must — ensure graceful degradation of service during traffic bursts. Use of thread pools is one acceptable approach to meeting this requirement.

...

The ExecutorService interface used in this compliant solution derives from the java.util.concurrent.Executor interface. The ExecutorService.submit() method allows callers to obtain a Future<V> object. This object both encapsulates the as-yet-unknown result of an asynchronous computation and also enables callers to perform additional functions such as task cancellation.

Wiki Markup
The choice of the unbounded {{newFixedThreadPool}} is maynot bealways inappropriateappropriate. Refer to the Java API documentation for guidance on choosing among the following methods to meet specific design requirements \[[API 2006|AA. Bibliography#API 06]\]: 

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="79d0f3a3c7c85610-793ad391-407f4d0d-b238a7a4-4aa727ff96a6eb3f1e5ed132"><ac:plain-text-body><![CDATA[

[[API 2006

AA. Bibliography#API 06]]

[Interface Executor

http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Executor.html]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="2acb706cc6e0e1cc-ad6dd0bb-498d418f-8c67b31b-f1c48b6846ef3df2947bc6cc"><ac:plain-text-body><![CDATA[

[[Lea 2000

AA. Bibliography#Lea 00]]

4.1.3, Thread-Per-Message; 4.1.4, Worker Threads

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e8cdef4b775f7e8e-52e928e9-42b64dd2-81f1b931-84147df89242954c98a5b16d"><ac:plain-text-body><![CDATA[

[[Tutorials 2008

AA. Bibliography#Tutorials 08]]

[Thread Pools

http://java.sun.com/docs/books/tutorial/essential/concurrency/pools.html]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ca239dd0c39c607c-82168eae-4ad34acd-8119baff-ebbec8941142444d4a5fc3e9"><ac:plain-text-body><![CDATA[

[[Goetz 2006

AA. Bibliography#Goetz 06]]

Chapter 8, Applying Thread Pools

]]></ac:plain-text-body></ac:structured-macro>

...