Repository: activemq-artemis Updated Branches: refs/heads/master 4a33d2d48 -> 156214049
ARTEMIS-357 No need to check copy any longer Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/7957f574 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/7957f574 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/7957f574 Branch: refs/heads/master Commit: 7957f574f69e8ac037e3c7f187e2fca3ef9c05ae Parents: 4a33d2d Author: Clebert Suconic <clebertsuco...@apache.org> Authored: Sat Jan 23 10:45:35 2016 -0500 Committer: Clebert Suconic <clebertsuco...@apache.org> Committed: Sat Jan 23 10:45:35 2016 -0500 ---------------------------------------------------------------------- .../artemis/core/message/impl/MessageImpl.java | 21 -------------------- .../core/message/impl/MessageInternal.java | 4 ---- .../impl/wireformat/SessionSendMessage.java | 2 -- .../impl/ScheduledDeliveryHandlerTest.java | 10 ---------- 4 files changed, 37 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7957f574/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java index 0c66aef..e7c33ff 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java @@ -84,8 +84,6 @@ public abstract class MessageImpl implements MessageInternal { private int endOfMessagePosition; - private boolean copied = true; - private UUID userID; // Constructors -------------------------------------------------- @@ -152,7 +150,6 @@ public abstract class MessageImpl implements MessageInternal { bufferValid = other.bufferValid; endOfBodyPosition = other.endOfBodyPosition; endOfMessagePosition = other.endOfMessagePosition; - copied = other.copied; if (other.buffer != null) { // We need to copy the underlying buffer too, since the different messsages thereafter might have different @@ -438,30 +435,12 @@ public abstract class MessageImpl implements MessageInternal { @Override public void bodyChanged() { - // If the body is changed we must copy the buffer otherwise can affect the previously sent message - // which might be in the Netty write queue - checkCopy(); - bufferValid = false; endOfBodyPosition = -1; } @Override - public synchronized void checkCopy() { - if (!copied) { - forceCopy(); - - copied = true; - } - } - - @Override - public synchronized void resetCopied() { - copied = false; - } - - @Override public int getEndOfMessagePosition() { return endOfMessagePosition; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7957f574/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageInternal.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageInternal.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageInternal.java index 728f1c5..a7b2199 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageInternal.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageInternal.java @@ -33,12 +33,8 @@ public interface MessageInternal extends Message { int getEndOfBodyPosition(); - void checkCopy(); - void bodyChanged(); - void resetCopied(); - boolean isServerMessage(); ActiveMQBuffer getEncodedBuffer(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7957f574/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java index 300f8ed..78d4862 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java @@ -93,8 +93,6 @@ public class SessionSendMessage extends MessagePacket { // Position reader for reading by Netty bufferWrite.readerIndex(0); - message.resetCopied(); - return bufferWrite; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7957f574/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java index 2448b29..e3d6850 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java @@ -430,21 +430,11 @@ public class ScheduledDeliveryHandlerTest extends Assert { } @Override - public void checkCopy() { - - } - - @Override public void bodyChanged() { } @Override - public void resetCopied() { - - } - - @Override public boolean isServerMessage() { return false; }