jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1446583 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeState.java
Date Fri, 15 Feb 2013 13:56:42 GMT
Author: jukka
Date: Fri Feb 15 13:56:41 2013
New Revision: 1446583

URL: http://svn.apache.org/r1446583
Log:
OAK-593: Segment-based MK

Implement SegmentNodeState.equals() as a first step in optimizing compareAgainstBaseState()

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeState.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeState.java?rev=1446583&r1=1446582&r2=1446583&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeState.java
Fri Feb 15 13:56:41 2013
@@ -102,4 +102,19 @@ class SegmentNodeState extends AbstractN
         return new MemoryNodeBuilder(this);
     }
 
+    public boolean equals(Object object) {
+        if (this == object) {
+            return true;
+        } else if (object instanceof NodeState) {
+            if (object instanceof SegmentNodeState
+                    && recordId.equals(((SegmentNodeState) object).recordId)) {
+                return true;
+            } else {
+                return super.equals(object);
+            }
+        } else {
+            return false;
+        }
+    }
+
 }



Mime
View raw message