diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2012-06-15 17:22:29 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2012-06-15 17:22:29 +0000 |
| commit | 152aa820ef2b024f6481b378b4bf7f87ff1f0565 (patch) | |
| tree | ae06fa082ddb2fc687bdaff566f7abeb2743de08 /qpid/java/common/src | |
| parent | 36d754c78ed94f696785ce168191165bde19ac88 (diff) | |
| download | qpid-python-152aa820ef2b024f6481b378b4bf7f87ff1f0565.tar.gz | |
QPID-4027 The Connection object will provide a reference to the
respective MessageFactory that can be used or creating messages or
decoding content for messages received. Since a connection object will
contain the AMQP version it would be the logical place to provide this
reference.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/address-refactor2@1350708 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/common/src')
| -rw-r--r-- | qpid/java/common/src/main/java/org/apache/qpid/transport/codec/BBEncoder.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/BBEncoder.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/BBEncoder.java index d9150bed65..4939f68048 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/BBEncoder.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/BBEncoder.java @@ -34,11 +34,12 @@ import java.util.UUID; */ public final class BBEncoder extends AbstractEncoder { + private static boolean ALLOCATE_DIRECT = Boolean.getBoolean("qpid.allocate-direct"); private ByteBuffer out; private int segment; public BBEncoder(int capacity) { - out = ByteBuffer.allocate(capacity); + out = ALLOCATE_DIRECT? ByteBuffer.allocateDirect(capacity) : ByteBuffer.allocate(capacity); out.order(ByteOrder.BIG_ENDIAN); segment = 0; } |
