activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [62/65] [abbrv] activemq-artemis git commit: cleanup openwire
Date Fri, 18 Mar 2016 01:42:51 GMT
cleanup openwire


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

Branch: refs/heads/refactor-openwire
Commit: ca535938665e4a64925261e8a3188658a947e0e9
Parents: 4f7373f
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Wed Mar 16 18:17:51 2016 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Thu Mar 17 14:10:46 2016 -0400

----------------------------------------------------------------------
 .../protocol/openwire/OpenWireConnection.java   | 13 -----
 .../openwire/OpenWireProtocolManager.java       |  1 -
 .../openwire/amq/AMQConsumerBrokerExchange.java | 23 ---------
 .../openwire/amq/AMQProducerBrokerExchange.java | 52 --------------------
 4 files changed, 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ca535938/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
index 5fc26b0..b872e63 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
@@ -439,18 +439,6 @@ public class OpenWireConnection extends AbstractRemotingConnection implements
Se
          }
          synchronized (consumerExchanges) {
             result.setConnectionContext(context);
-            SessionState ss = state.getSessionState(id.getParentId());
-            if (ss != null) {
-               ConsumerState cs = ss.getConsumerState(id);
-               if (cs != null) {
-                  ConsumerInfo info = cs.getInfo();
-                  if (info != null) {
-                     if (info.getDestination() != null && info.getDestination().isPattern())
{
-                        result.setWildcard(true);
-                     }
-                  }
-               }
-            }
             consumerExchanges.put(id, result);
          }
       }
@@ -476,7 +464,6 @@ public class OpenWireConnection extends AbstractRemotingConnection implements
Se
                ProducerState producerState = ss.getProducerState(id);
                if (producerState != null && producerState.getInfo() != null) {
                   ProducerInfo info = producerState.getInfo();
-                  result.setMutable(info.getDestination() == null || info.getDestination().isComposite());
                }
             }
             producerExchanges.put(id, result);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ca535938/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
index b560076..bbbb696 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
@@ -367,7 +367,6 @@ public class OpenWireProtocolManager implements ProtocolManager<Interceptor>,
Cl
       boolean originalFlowControl = context.isProducerFlowControl();
       final AMQProducerBrokerExchange producerExchange = new AMQProducerBrokerExchange();
       producerExchange.setConnectionContext(context);
-      producerExchange.setMutable(true);
       producerExchange.setProducerState(new ProducerState(new ProducerInfo()));
       try {
          context.setProducerFlowControl(false);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ca535938/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumerBrokerExchange.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumerBrokerExchange.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumerBrokerExchange.java
index 800ee3f..c481618 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumerBrokerExchange.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumerBrokerExchange.java
@@ -28,35 +28,12 @@ public abstract class AMQConsumerBrokerExchange {
    public AMQConsumerBrokerExchange(AMQSession amqSession) {
       this.amqSession = amqSession;
    }
-
-   /**
-    * @return the connectionContext
-    */
-   public AMQConnectionContext getConnectionContext() {
-      return this.connectionContext;
-   }
-
    /**
     * @param connectionContext the connectionContext to set
     */
    public void setConnectionContext(AMQConnectionContext connectionContext) {
       this.connectionContext = connectionContext;
    }
-
-   /**
-    * @return the wildcard
-    */
-   public boolean isWildcard() {
-      return this.wildcard;
-   }
-
-   /**
-    * @param wildcard the wildcard to set
-    */
-   public void setWildcard(boolean wildcard) {
-      this.wildcard = wildcard;
-   }
-
    public abstract void acknowledge(MessageAck ack) throws Exception;
 
    public abstract void processMessagePull(MessagePull messagePull) throws Exception;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ca535938/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQProducerBrokerExchange.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQProducerBrokerExchange.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQProducerBrokerExchange.java
index b5d8dbd..220c7fc 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQProducerBrokerExchange.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQProducerBrokerExchange.java
@@ -16,29 +16,16 @@
  */
 package org.apache.activemq.artemis.core.protocol.openwire.amq;
 
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-
 import org.apache.activemq.state.ProducerState;
 
 public class AMQProducerBrokerExchange {
 
    private AMQConnectionContext connectionContext;
    private ProducerState producerState;
-   private boolean mutable = true;
-   private final FlowControlInfo flowControlInfo = new FlowControlInfo();
 
    public AMQProducerBrokerExchange() {
    }
 
-   public AMQProducerBrokerExchange copy() {
-      AMQProducerBrokerExchange rc = new AMQProducerBrokerExchange();
-      rc.connectionContext = connectionContext.copy();
-      rc.producerState = producerState;
-      rc.mutable = mutable;
-      return rc;
-   }
-
    /**
     * @return the connectionContext
     */
@@ -54,13 +41,6 @@ public class AMQProducerBrokerExchange {
    }
 
    /**
-    * @param mutable the mutable to set
-    */
-   public void setMutable(boolean mutable) {
-      this.mutable = mutable;
-   }
-
-   /**
     * @return the producerState
     */
    public ProducerState getProducerState() {
@@ -76,36 +56,4 @@ public class AMQProducerBrokerExchange {
 
    public void setLastStoredSequenceId(long l) {
    }
-
-   public void blockingOnFlowControl(boolean blockingOnFlowControl) {
-      flowControlInfo.setBlockingOnFlowControl(blockingOnFlowControl);
-   }
-
-   public static class FlowControlInfo {
-
-      private AtomicBoolean blockingOnFlowControl = new AtomicBoolean();
-      private AtomicLong totalSends = new AtomicLong();
-      private AtomicLong sendsBlocked = new AtomicLong();
-      private AtomicLong totalTimeBlocked = new AtomicLong();
-
-      public void setBlockingOnFlowControl(boolean blockingOnFlowControl) {
-         this.blockingOnFlowControl.set(blockingOnFlowControl);
-         if (blockingOnFlowControl) {
-            incrementSendBlocked();
-         }
-      }
-
-      public void incrementSendBlocked() {
-         this.sendsBlocked.incrementAndGet();
-      }
-
-      public void reset() {
-         blockingOnFlowControl.set(false);
-         totalSends.set(0);
-         sendsBlocked.set(0);
-         totalTimeBlocked.set(0);
-
-      }
-   }
-
 }


Mime
View raw message