From 55ccbf149980b06c7b7effa36871ffbdf50550fa Mon Sep 17 00:00:00 2001 From: Robert Godfrey Date: Wed, 28 Dec 2011 13:02:41 +0000 Subject: QPID-3714 : [Java] Performance Improvements Persistence: Store message in same transaction as enqueue if possible Memory: Remove unnecessary (un)boxing Reduce unnecessary copying of message data Cache short strings Cache queues for a given routing key on an Exchange (0-9) Use a fixed size buffer for preparing frames to write out Other: Reduce calls to System.currentTimeMillis (0-10) Special case immutable RangeSets, in particular RangeSets of a single range/point (0-10) Special case delivery properties and message properties in headers (0-9) send commit-ok as soon as data committed to store Cache publishing access control queries (0-9) Optimised long and int typed values for FieldTables (0-9) Retain FieldTable encoded form (0-9) Cache queue and topic destinations git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1225178 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/common/Composite.tpl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qpid/java/common/Composite.tpl') diff --git a/qpid/java/common/Composite.tpl b/qpid/java/common/Composite.tpl index 350dd893c8..2cbd6830f6 100644 --- a/qpid/java/common/Composite.tpl +++ b/qpid/java/common/Composite.tpl @@ -245,6 +245,11 @@ if segments: return this; } + public int getBodySize() + { + return this.body == null ? 0 : this.body.remaining(); + } + public final ByteBuffer getBody() { if (this.body == null) { -- cgit v1.2.1