From 865705e79bb45635aa12f0b07de792efe842463c Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Tue, 21 Jul 2009 10:41:45 +0000 Subject: [PATCH] More correct explanation on OMATPE extension --- .../execution/OrderedMemoryAwareThreadPoolExecutor.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java b/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java index df5d5cbd70..c2a257d989 100644 --- a/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java +++ b/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java @@ -22,6 +22,7 @@ */ package org.jboss.netty.handler.execution; +import java.util.IdentityHashMap; import java.util.LinkedList; import java.util.Set; import java.util.WeakHashMap; @@ -79,12 +80,14 @@ import org.jboss.netty.util.internal.ConcurrentIdentityWeakKeyHashMap; * *
  * public class RemoteAddressBasedOMATPE extends OrderedMemoryAwareThreadPoolExecutor {
+ *
  *     ... Constructors ...
  *
  *     protected ConcurrentMap<Object, Executor> new ChildExecutorMap() {
  *         // The default implementation returns a special ConcurrentMap that
- *         // is optimized for the case where the key is Channel, so we need to
- *         // provide more generic implementation.
+ *         // uses identity comparison only (see {@link IdentityHashMap}).
+ *         // Because SocketAddress does not work with identity comparison,
+ *         // we need to employ more generic implementation.
  *         return new ConcurrentHashMap<Object, Executor>
  *     }
  *