Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 66628 invoked from network); 19 Nov 2007 19:56:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Nov 2007 19:56:39 -0000 Received: (qmail 61935 invoked by uid 500); 19 Nov 2007 19:56:24 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 61891 invoked by uid 500); 19 Nov 2007 19:56:23 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 61880 invoked by uid 99); 19 Nov 2007 19:56:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2007 11:56:23 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yseeley@gmail.com designates 64.233.170.190 as permitted sender) Received: from [64.233.170.190] (HELO rn-out-0102.google.com) (64.233.170.190) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2007 19:56:13 +0000 Received: by rn-out-0102.google.com with SMTP id v46so1185119rnb for ; Mon, 19 Nov 2007 11:56:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=znP9dOOhJUiEAWcVD39vYlw+e3WaInRcpdc56atHI84=; b=TjF+Yp7dWYMvsyt+SWE/B4d8INN0/kIintxeMmiXQPCOfGuYBuY38Dr8exAPYu/GAAUNAhbn+4KWX0xWIsW+4Xuuc793UBH5QNiEmQ4I/Swv+jn9lvBMLDeJz+BTTQCukoTb0T9eUpcLLTbxDKhp5j/2ibRiVl137f0izt8V5xc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=rsWnM6PbUKOg8qA1Vx+zs6zVfWOCKFAlkuBFSV0gcZ8ULzU5MTfQKDIRchfIbC/MZP0uKB/1zKIPIPZN3kamR//tUmevojgjeVqgvVMm2XSGxSLXbLhDfa4OzHw+bA8ith/CJy5Vv1wfO9FuOeTCIwQCGWGix8f7yvmXBzsWk64= Received: by 10.142.47.6 with SMTP id u6mr1331584wfu.1195502166205; Mon, 19 Nov 2007 11:56:06 -0800 (PST) Received: by 10.143.165.13 with HTTP; Mon, 19 Nov 2007 11:56:06 -0800 (PST) Message-ID: Date: Mon, 19 Nov 2007 14:56:06 -0500 From: "Yonik Seeley" Sender: yseeley@gmail.com To: java-dev@lucene.apache.org Subject: Re: Payload API In-Reply-To: <4741E72E.7070309@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1195384072.4792.1221956273@webmail.messagingengine.com> <47407EE8.6080603@gmail.com> <1195409977.30920.1221991475@webmail.messagingengine.com> <1195490280.7408.1222149151@webmail.messagingengine.com> <4741D41E.50909@gmail.com> <4741E72E.7070309@gmail.com> X-Google-Sender-Auth: ca2c77b2f659e078 X-Virus-Checked: Checked by ClamAV on apache.org On Nov 19, 2007 2:42 PM, Michael Busch wrote: > Yonik Seeley wrote: > > > > Immutable implies that the user needs to do a new byte[] for every payload, yes? > > It seems like this would be slower if payloads were common and faster > > if very rare. > > > > No, Payload has this ctr: > public Payload(byte[] data, int offset, int length); > > So the same byte[] array can currently be used for multiple Payloads. That's not immutable if I can change the bytes in the byte[] (and it's legal to do so), since it will result in the value of other payload objects changing. -Yonik --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org