activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-1069 Artemis unsafe usage on Eventls polling
Date Mon, 27 Mar 2017 16:31:18 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 07f7916ed -> 78d0193fc


ARTEMIS-1069 Artemis unsafe usage on Eventls polling


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/af0be518
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/af0be518
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/af0be518

Branch: refs/heads/master
Commit: af0be518e15a2f680f024e6f419cc576ad6ae678
Parents: 07f7916
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Mon Mar 27 11:41:20 2017 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Mar 27 11:41:20 2017 -0400

----------------------------------------------------------------------
 .../amqp/proton/AMQPConnectionContext.java      |  4 ----
 .../amqp/proton/handler/ProtonHandler.java      | 22 ++++----------------
 2 files changed, 4 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/af0be518/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java
index 25c4b56..1c38942 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java
@@ -143,10 +143,6 @@ public class AMQPConnectionContext extends ProtonInitializable {
       handler.flush();
    }
 
-   public void flush(boolean wait) {
-      handler.flush(wait);
-   }
-
    public void close(ErrorCondition errorCondition) {
       handler.close(errorCondition);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/af0be518/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java
index 6b66f62..045016a 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java
@@ -56,12 +56,7 @@ public class ProtonHandler extends ProtonInitializable {
 
    private final Executor dispatchExecutor;
 
-   private final Runnable dispatchRunnable = new Runnable() {
-      @Override
-      public void run() {
-         dispatch();
-      }
-   };
+   private final Runnable dispatchRunnable = () -> dispatch();
 
    private ArrayList<EventHandler> handlers = new ArrayList<>();
 
@@ -251,22 +246,12 @@ public class ProtonHandler extends ProtonInitializable {
    }
 
    public void flush() {
-      flush(false);
-   }
-
-   public void flush(boolean wait) {
       synchronized (lock) {
          transport.process();
-
          checkServerSASL();
-
       }
 
-      if (wait) {
-         dispatch();
-      } else {
-         dispatchExecutor.execute(dispatchRunnable);
-      }
+      dispatchExecutor.execute(dispatchRunnable);
    }
 
    public void close(ErrorCondition errorCondition) {
@@ -276,7 +261,8 @@ public class ProtonHandler extends ProtonInitializable {
          }
          connection.close();
       }
-      flush(true);
+
+      flush();
    }
 
    protected void checkServerSASL() {


Mime
View raw message