More correct explanation on OMATPE extension

This commit is contained in:
Trustin Lee 2009-07-21 10:41:45 +00:00
parent a92142e493
commit 865705e79b

View File

@ -22,6 +22,7 @@
*/ */
package org.jboss.netty.handler.execution; package org.jboss.netty.handler.execution;
import java.util.IdentityHashMap;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Set; import java.util.Set;
import java.util.WeakHashMap; import java.util.WeakHashMap;
@ -79,12 +80,14 @@ import org.jboss.netty.util.internal.ConcurrentIdentityWeakKeyHashMap;
* *
* <pre> * <pre>
* public class RemoteAddressBasedOMATPE extends OrderedMemoryAwareThreadPoolExecutor { * public class RemoteAddressBasedOMATPE extends OrderedMemoryAwareThreadPoolExecutor {
*
* ... Constructors ... * ... Constructors ...
* *
* protected ConcurrentMap&lt;Object, Executor&gt; new ChildExecutorMap() { * protected ConcurrentMap&lt;Object, Executor&gt; new ChildExecutorMap() {
* // The default implementation returns a special ConcurrentMap that * // The default implementation returns a special ConcurrentMap that
* // is optimized for the case where the key is Channel, so we need to * // uses identity comparison only (see {@link IdentityHashMap}).
* // provide more generic implementation. * // Because SocketAddress does not work with identity comparison,
* // we need to employ more generic implementation.
* return new ConcurrentHashMap&lt;Object, Executor&gt; * return new ConcurrentHashMap&lt;Object, Executor&gt;
* } * }
* *