[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] activemq-artemis pull request #2467: ARTEMIS-2205 Performance improvements o...

Github user clebertsuconic commented on a diff in the pull request:
    --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ ---
    @@ -0,0 +1,221 @@
    + * Copyright 2005-2014 Red Hat, Inc.
    + * Red Hat licenses this file to you under the Apache License, version
    + * 2.0 (the "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * implied.  See the License for the specific language governing
    + * permissions and limitations under the License.
    + */
    +package org.apache.activemq.artemis.protocol.amqp.proton.handler;
    +import java.util.Collection;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.concurrent.Callable;
    +import java.util.concurrent.ExecutionException;
    +import java.util.concurrent.TimeUnit;
    +import java.util.concurrent.TimeoutException;
    +import io.netty.util.concurrent.EventExecutor;
    +import io.netty.util.concurrent.Future;
    +import io.netty.util.concurrent.ProgressivePromise;
    +import io.netty.util.concurrent.Promise;
    +import io.netty.util.concurrent.ScheduledFuture;
    +import org.apache.activemq.artemis.utils.actors.ArtemisExecutor;
    +/** Test cases may supply a simple executor instead of the real Netty Executor
    + *  On that case this is a simple adapter for what's needed from these tests.
    + *  Not intended to be used in production.
    + *
    + *  TODO: This could be refactored out of the main codebase but at a high cost.
    + *        We may do it some day if we find an easy way that won't clutter the code too much.
    + *  */
    +public class ExecutorNettyAdapter implements EventLoop {
    --- End diff --
    @franz1981 that's correct.
    Placing it on the testsuite only would require some work that I do not want to go through.