diff --git a/src/main/java/io/netty/handler/execution/MemoryAwareThreadPoolExecutor.java b/src/main/java/io/netty/handler/execution/MemoryAwareThreadPoolExecutor.java index 97d8dd53ec..efb91aea08 100644 --- a/src/main/java/io/netty/handler/execution/MemoryAwareThreadPoolExecutor.java +++ b/src/main/java/io/netty/handler/execution/MemoryAwareThreadPoolExecutor.java @@ -363,8 +363,8 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor { int increment = settings.objectSizeEstimator.estimateSize(task); - if (task instanceof ChannelUpstreamEventRunnable) { - ChannelUpstreamEventRunnable eventTask = (ChannelUpstreamEventRunnable) task; + if (task instanceof ChannelEventRunnable) { + ChannelEventRunnable eventTask = (ChannelEventRunnable) task; eventTask.estimatedSize = increment; Channel channel = eventTask.getEvent().getChannel(); long channelCounter = getChannelCounter(channel).addAndGet(increment); @@ -408,8 +408,8 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor { totalLimiter.decrease(increment); } - if (task instanceof ChannelUpstreamEventRunnable) { - ChannelUpstreamEventRunnable eventTask = (ChannelUpstreamEventRunnable) task; + if (task instanceof ChannelEventRunnable) { + ChannelEventRunnable eventTask = (ChannelEventRunnable) task; Channel channel = eventTask.getEvent().getChannel(); long channelCounter = getChannelCounter(channel).addAndGet(-increment); //System.out.println("DC: " + channelCounter + ", " + increment); diff --git a/src/main/java/io/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java b/src/main/java/io/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java index 7147db43f8..924c329a45 100644 --- a/src/main/java/io/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java +++ b/src/main/java/io/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java @@ -234,10 +234,10 @@ public class OrderedMemoryAwareThreadPoolExecutor extends */ @Override protected void doExecute(Runnable task) { - if (!(task instanceof ChannelUpstreamEventRunnable)) { + if (!(task instanceof ChannelEventRunnable)) { doUnorderedExecute(task); } else { - ChannelUpstreamEventRunnable r = (ChannelUpstreamEventRunnable) task; + ChannelEventRunnable r = (ChannelEventRunnable) task; getChildExecutor(r.getEvent()).execute(task); } }