jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1448552 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/MemoryStore.java
Date Thu, 21 Feb 2013 08:52:57 GMT
Author: jukka
Date: Thu Feb 21 08:52:57 2013
New Revision: 1448552

URL: http://svn.apache.org/r1448552
Log:
OAK-633: SegmentMK: Hierarchy of journals

Use ConcurrentMap.putIfAbsent in MemoryStore

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/MemoryStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/MemoryStore.java?rev=1448552&r1=1448551&r2=1448552&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/MemoryStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/MemoryStore.java
Thu Feb 21 08:52:57 2013
@@ -70,7 +70,7 @@ public class MemoryStore implements Segm
 
     @Override
     public void createSegment(Segment segment) {
-        if (segments.put(segment.getSegmentId(), segment) != null) {
+        if (segments.putIfAbsent(segment.getSegmentId(), segment) != null) {
             throw new IllegalStateException(
                     "Segment override: " + segment.getSegmentId());
         }



Mime
View raw message