From oak-dev-return-1730-apmail-jackrabbit-oak-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Fri Jul 6 22:04:35 2012 Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1CDDEC15F for ; Fri, 6 Jul 2012 22:04:35 +0000 (UTC) Received: (qmail 61209 invoked by uid 500); 6 Jul 2012 22:04:35 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 61181 invoked by uid 500); 6 Jul 2012 22:04:35 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 61158 invoked by uid 99); 6 Jul 2012 22:04:34 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2012 22:04:34 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 87439142822 for ; Fri, 6 Jul 2012 22:04:34 +0000 (UTC) Date: Fri, 6 Jul 2012 22:04:33 +0000 (UTC) From: =?utf-8?Q?Michael_D=C3=BCrig_=28JIRA=29?= To: oak-dev@jackrabbit.apache.org Message-ID: <746213728.16574.1341612274559.JavaMail.jiratomcat@issues-vm> In-Reply-To: <679565299.13937.1341579454318.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (OAK-171) Add NodeState.compareAgainstBaseState() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OAK-171?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1340838= 9#comment-13408389 ]=20 Michael D=C3=BCrig commented on OAK-171: ----------------------------------- In revision 1358443 I replaced more usage of {{NodeStore.compare()}} with {= {NodeState.compareAgainstBaseState()}} which simplifies the code quite a bi= t. {{NodeStore.compare()}} is not used any more now and we might even want = to consider removing it. =20 > Add NodeState.compareAgainstBaseState() > --------------------------------------- > > Key: OAK-171 > URL: https://issues.apache.org/jira/browse/OAK-171 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: core > Reporter: Jukka Zitting > Priority: Minor > > The {{NodeStore.compare()}} method provides a common mechanism for compar= ing any two node states, and we originally decided to put the method on the= {{NodeStore}} interface instead of on {{NodeState}} as for performance rea= sons we may want to dispatch the actual diffing operation based on the impl= ementation of either one of the given {{NodeState}} instances. > In practice it turns out that there's an important special case of this o= peration, comparing a {{NodeState}} against an earlier version of it (i.e. = a base state), that is easy to dispatch based on just the modified state an= d is used so often that keeping the separate {{NodeStore}} reference around= for the comparison operation tends to unnecessarily complicate relevant co= de. > Thus I'd like to introduce a {{NodeState.compareAgainstBaseState()}} meth= od signature in {{oak-core}} for this specific case. We'd still keep the {{= NodeStore.compare()}} method around for more complicated diffing cases. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira