Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/RecordWriters.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/RecordWriters.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/RecordWriters.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/RecordWriters.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/RecordWriters.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/RecordWriters.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/RecordWriters.java
 Wed Apr 20 10:34:51 2016
@@ -1,37 +1,39 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.collect.Lists.newArrayListWithCapacity;
 import static java.util.Arrays.sort;
 import static java.util.Collections.singleton;
-import static org.apache.jackrabbit.oak.plugins.segment.MapRecord.SIZE_BITS;
-import static org.apache.jackrabbit.oak.plugins.segment.RecordType.BLOCK;
-import static org.apache.jackrabbit.oak.plugins.segment.RecordType.BRANCH;
-import static org.apache.jackrabbit.oak.plugins.segment.RecordType.BUCKET;
-import static org.apache.jackrabbit.oak.plugins.segment.RecordType.LEAF;
-import static org.apache.jackrabbit.oak.plugins.segment.RecordType.LIST;
-import static org.apache.jackrabbit.oak.plugins.segment.RecordType.NODE;
-import static org.apache.jackrabbit.oak.plugins.segment.RecordType.TEMPLATE;
-import static org.apache.jackrabbit.oak.plugins.segment.RecordType.VALUE;
-import static 
org.apache.jackrabbit.oak.plugins.segment.Segment.RECORD_ID_BYTES;
-import static org.apache.jackrabbit.oak.plugins.segment.Segment.SMALL_LIMIT;
-import static org.apache.jackrabbit.oak.plugins.segment.SegmentVersion.V_11;
+import static org.apache.jackrabbit.oak.segment.MapRecord.SIZE_BITS;
+import static org.apache.jackrabbit.oak.segment.RecordType.BLOCK;
+import static org.apache.jackrabbit.oak.segment.RecordType.BRANCH;
+import static org.apache.jackrabbit.oak.segment.RecordType.BUCKET;
+import static org.apache.jackrabbit.oak.segment.RecordType.LEAF;
+import static org.apache.jackrabbit.oak.segment.RecordType.LIST;
+import static org.apache.jackrabbit.oak.segment.RecordType.NODE;
+import static org.apache.jackrabbit.oak.segment.RecordType.TEMPLATE;
+import static org.apache.jackrabbit.oak.segment.RecordType.VALUE;
+import static org.apache.jackrabbit.oak.segment.Segment.RECORD_ID_BYTES;
+import static org.apache.jackrabbit.oak.segment.Segment.SMALL_LIMIT;
+import static org.apache.jackrabbit.oak.segment.SegmentVersion.V_11;
 
 import java.io.IOException;
 import java.util.Collection;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/Segment.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/Segment.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/Segment.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/Segment.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/Segment.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/Segment.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/Segment.java
 Wed Apr 20 10:34:51 2016
@@ -1,20 +1,22 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -24,8 +26,7 @@ import static com.google.common.collect.
 import static com.google.common.collect.Maps.newConcurrentMap;
 import static java.lang.Boolean.getBoolean;
 import static org.apache.jackrabbit.oak.commons.IOUtils.closeQuietly;
-import static org.apache.jackrabbit.oak.plugins.segment.SegmentVersion.V_11;
-import static 
org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.BLOCK_SIZE;
+import static org.apache.jackrabbit.oak.segment.SegmentWriter.BLOCK_SIZE;
 
 import java.io.IOException;
 import java.io.OutputStream;
@@ -203,7 +204,7 @@ public class Segment {
     }
 
     public Segment(SegmentTracker tracker, SegmentId id, ByteBuffer data) {
-        this(tracker, id, data, V_11);
+        this(tracker, id, data, SegmentVersion.V_11);
     }
 
     public Segment(SegmentTracker tracker, final SegmentId id, final 
ByteBuffer data, SegmentVersion version) {
@@ -606,7 +607,7 @@ public class Segment {
         }
 
         PropertyTemplate[] properties;
-        if (version.onOrAfter(V_11)) {
+        if (version.onOrAfter(SegmentVersion.V_11)) {
             properties = readPropsV11(propertyCount, offset);
         } else {
             properties = readPropsV10(propertyCount, offset);

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBlob.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBlob.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBlob.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java
 Wed Apr 20 10:34:51 2016
@@ -1,27 +1,29 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Charsets.UTF_8;
 import static com.google.common.collect.Sets.newHashSet;
 import static java.util.Collections.emptySet;
-import static org.apache.jackrabbit.oak.plugins.segment.Segment.MEDIUM_LIMIT;
-import static org.apache.jackrabbit.oak.plugins.segment.Segment.SMALL_LIMIT;
-import static 
org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.BLOCK_SIZE;
+import static org.apache.jackrabbit.oak.segment.Segment.MEDIUM_LIMIT;
+import static org.apache.jackrabbit.oak.segment.Segment.SMALL_LIMIT;
+import static org.apache.jackrabbit.oak.segment.SegmentWriter.BLOCK_SIZE;
 
 import java.io.InputStream;
 import java.util.List;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlobReferenceRetriever.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBlobReferenceRetriever.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlobReferenceRetriever.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlobReferenceRetriever.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBlobReferenceRetriever.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBlobReferenceRetriever.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlobReferenceRetriever.java
 Wed Apr 20 10:34:51 2016
@@ -16,7 +16,8 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+
+package org.apache.jackrabbit.oak.segment;
 
 import org.apache.jackrabbit.oak.plugins.blob.BlobReferenceRetriever;
 import org.apache.jackrabbit.oak.plugins.blob.ReferenceCollector;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriter.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBufferWriter.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriter.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriter.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBufferWriter.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBufferWriter.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriter.java
 Wed Apr 20 10:34:51 2016
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Charsets.UTF_8;
 import static com.google.common.base.Preconditions.checkArgument;
@@ -29,13 +29,13 @@ import static com.google.common.collect.
 import static java.lang.System.arraycopy;
 import static java.lang.System.currentTimeMillis;
 import static java.lang.System.identityHashCode;
-import static 
org.apache.jackrabbit.oak.plugins.segment.RecordWriters.newValueWriter;
-import static org.apache.jackrabbit.oak.plugins.segment.Segment.GC_GEN_OFFSET;
-import static 
org.apache.jackrabbit.oak.plugins.segment.Segment.MAX_SEGMENT_SIZE;
-import static 
org.apache.jackrabbit.oak.plugins.segment.Segment.RECORD_ID_BYTES;
-import static 
org.apache.jackrabbit.oak.plugins.segment.Segment.SEGMENT_REFERENCE_LIMIT;
-import static org.apache.jackrabbit.oak.plugins.segment.Segment.align;
-import static 
org.apache.jackrabbit.oak.plugins.segment.SegmentId.isDataSegmentId;
+import static org.apache.jackrabbit.oak.segment.RecordWriters.newValueWriter;
+import static org.apache.jackrabbit.oak.segment.Segment.GC_GEN_OFFSET;
+import static org.apache.jackrabbit.oak.segment.Segment.MAX_SEGMENT_SIZE;
+import static org.apache.jackrabbit.oak.segment.Segment.RECORD_ID_BYTES;
+import static 
org.apache.jackrabbit.oak.segment.Segment.SEGMENT_REFERENCE_LIMIT;
+import static org.apache.jackrabbit.oak.segment.Segment.align;
+import static org.apache.jackrabbit.oak.segment.SegmentId.isDataSegmentId;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -181,7 +181,7 @@ public class SegmentBufferWriter impleme
         try {
             segment = new Segment(tracker, buffer, metaInfo);
             byte[] data = metaInfo.getBytes(UTF_8);
-            newValueWriter(data.length, data).write(this);
+            RecordWriters.newValueWriter(data.length, data).write(this);
         } catch (IOException e) {
             LOG.error("Unable to write meta info to segment {} {}", 
segment.getSegmentId(), metaInfo);
         }

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriterPool.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBufferWriterPool.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriterPool.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriterPool.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBufferWriterPool.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentBufferWriterPool.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriterPool.java
 Wed Apr 20 10:34:51 2016
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.collect.Lists.newArrayList;
 import static com.google.common.collect.Maps.newHashMap;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentCheckpointMBean.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentCheckpointMBean.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentCheckpointMBean.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentCheckpointMBean.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentCheckpointMBean.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentCheckpointMBean.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentCheckpointMBean.java
 Wed Apr 20 10:34:51 2016
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import java.util.Date;
 

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentDiscoveryLiteService.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentDiscoveryLiteService.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentDiscoveryLiteService.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentDiscoveryLiteService.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentDiscoveryLiteService.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentDiscoveryLiteService.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentDiscoveryLiteService.java
 Wed Apr 20 10:34:51 2016
@@ -16,7 +16,8 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+
+package org.apache.jackrabbit.oak.segment;
 
 import java.util.Collections;
 import java.util.UUID;
@@ -52,7 +53,7 @@ import org.slf4j.LoggerFactory;
 @Service(value = { SegmentDiscoveryLiteService.class })
 public class SegmentDiscoveryLiteService {
 
-    static final String COMPONENT_NAME = 
"org.apache.jackrabbit.oak.plugins.segment.SegmentDiscoveryLiteService";
+    static final String COMPONENT_NAME = "SegmentDiscoveryLiteService";
 
     /**
      * Name of the repository descriptor via which the clusterView is published

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentGraph.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentGraph.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentGraph.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentGraph.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentGraph.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentGraph.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentGraph.java
 Wed Apr 20 10:34:51 2016
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -28,7 +28,7 @@ import static java.lang.String.valueOf;
 import static java.util.Collections.singletonMap;
 import static java.util.regex.Pattern.compile;
 import static org.apache.jackrabbit.oak.commons.IOUtils.closeQuietly;
-import static 
org.apache.jackrabbit.oak.plugins.segment.SegmentId.isDataSegmentId;
+import static org.apache.jackrabbit.oak.segment.SegmentId.isDataSegmentId;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -56,7 +56,7 @@ import com.google.common.collect.Multise
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.commons.json.JsonObject;
 import org.apache.jackrabbit.oak.commons.json.JsopTokenizer;
-import org.apache.jackrabbit.oak.plugins.segment.file.FileStore.ReadOnlyStore;
+import org.apache.jackrabbit.oak.segment.file.FileStore.ReadOnlyStore;
 
 /**
  * Utility graph for parsing a segment graph.

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentId.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentId.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentId.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentId.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentId.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentId.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentId.java
 Wed Apr 20 10:34:51 2016
@@ -1,20 +1,22 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static java.lang.Integer.getInteger;
 import static java.lang.Integer.rotateLeft;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentIdTable.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentIdTable.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentIdTable.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentIdTable.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentIdTable.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentIdTable.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentIdTable.java
 Wed Apr 20 10:34:51 2016
@@ -1,20 +1,22 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.collect.Lists.newArrayList;
 import static com.google.common.collect.Maps.newHashMapWithExpectedSize;
@@ -26,7 +28,7 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy;
+import org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeBuilder.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeBuilder.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeBuilder.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeBuilder.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeBuilder.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeBuilder.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeBuilder.java
 Wed Apr 20 10:34:51 2016
@@ -1,20 +1,22 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import java.io.IOException;
 import java.io.InputStream;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeState.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeState.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeState.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeState.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeState.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeState.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeState.java
 Wed Apr 20 10:34:51 2016
@@ -1,20 +1,22 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -31,9 +33,8 @@ import static org.apache.jackrabbit.oak.
 import static org.apache.jackrabbit.oak.api.Type.STRINGS;
 import static 
org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE;
 import static 
org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.MISSING_NODE;
-import static org.apache.jackrabbit.oak.plugins.segment.Segment.decode;
-import static org.apache.jackrabbit.oak.plugins.segment.Segment.readString;
-import static org.apache.jackrabbit.oak.plugins.segment.SegmentVersion.V_11;
+import static org.apache.jackrabbit.oak.segment.Segment.decode;
+import static org.apache.jackrabbit.oak.segment.Segment.readString;
 import static 
org.apache.jackrabbit.oak.spi.state.AbstractNodeState.checkValidName;
 
 import java.util.Collections;
@@ -153,7 +154,7 @@ public class SegmentNodeState extends Re
         if (propertyTemplate != null) {
             Segment segment = getSegment();
             RecordId id;
-            if (getSegment().getSegmentVersion().onOrAfter(V_11)) {
+            if 
(getSegment().getSegmentVersion().onOrAfter(SegmentVersion.V_11)) {
                 id = getRecordIdV11(segment, template, propertyTemplate);
             } else {
                 id = getRecordIdV10(segment, template, propertyTemplate);
@@ -208,7 +209,7 @@ public class SegmentNodeState extends Re
             ids++;
         }
 
-        if (segment.getSegmentVersion().onOrAfter(V_11)) {
+        if (segment.getSegmentVersion().onOrAfter(SegmentVersion.V_11)) {
             if (propertyTemplates.length > 0) {
                 ListRecord pIds = new ListRecord(
                         segment.readRecordId(getOffset(0, ids)),
@@ -302,7 +303,7 @@ public class SegmentNodeState extends Re
 
         Segment segment = getSegment();
         RecordId id;
-        if (segment.getSegmentVersion().onOrAfter(V_11)) {
+        if (segment.getSegmentVersion().onOrAfter(SegmentVersion.V_11)) {
             id = getRecordIdV11(segment, template, propertyTemplate);
         } else {
             id = getRecordIdV10(segment, template, propertyTemplate);
@@ -345,7 +346,7 @@ public class SegmentNodeState extends Re
 
         Segment segment = getSegment();
         RecordId id;
-        if (getSegment().getSegmentVersion().onOrAfter(V_11)) {
+        if (getSegment().getSegmentVersion().onOrAfter(SegmentVersion.V_11)) {
             id = getRecordIdV11(segment, template, propertyTemplate);
         } else {
             id = getRecordIdV10(segment, template, propertyTemplate);

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java
 Wed Apr 20 10:34:51 2016
@@ -1,20 +1,22 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -27,7 +29,7 @@ import static java.util.concurrent.TimeU
 import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.jackrabbit.oak.api.Type.LONG;
 import static org.apache.jackrabbit.oak.api.Type.STRING;
-import static 
org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy.NO_COMPACTION;
+import static 
org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy.NO_COMPACTION;
 
 import java.io.Closeable;
 import java.io.IOException;
@@ -48,7 +50,7 @@ import javax.annotation.Nonnull;
 import org.apache.jackrabbit.oak.api.Blob;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy;
+import org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy;
 import org.apache.jackrabbit.oak.spi.blob.BlobStore;
 import org.apache.jackrabbit.oak.spi.commit.ChangeDispatcher;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java
 Wed Apr 20 10:34:51 2016
@@ -1,20 +1,22 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Preconditions.checkState;
 import static java.util.Collections.emptyMap;
@@ -22,14 +24,14 @@ import static org.apache.jackrabbit.oak.
 import static org.apache.jackrabbit.oak.commons.PropertiesUtil.toInteger;
 import static org.apache.jackrabbit.oak.commons.PropertiesUtil.toLong;
 import static 
org.apache.jackrabbit.oak.osgi.OsgiUtil.lookupConfigurationThenFramework;
-import static 
org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy.CLEANUP_DEFAULT;
-import static 
org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy.CLONE_BINARIES_DEFAULT;
-import static 
org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy.FORCE_AFTER_FAIL_DEFAULT;
-import static 
org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy.GAIN_THRESHOLD_DEFAULT;
-import static 
org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy.MEMORY_THRESHOLD_DEFAULT;
-import static 
org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy.PAUSE_DEFAULT;
-import static 
org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy.RETRY_COUNT_DEFAULT;
-import static 
org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy.TIMESTAMP_DEFAULT;
+import static 
org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy.CLEANUP_DEFAULT;
+import static 
org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy.CLONE_BINARIES_DEFAULT;
+import static 
org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy.FORCE_AFTER_FAIL_DEFAULT;
+import static 
org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy.GAIN_THRESHOLD_DEFAULT;
+import static 
org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy.MEMORY_THRESHOLD_DEFAULT;
+import static 
org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy.PAUSE_DEFAULT;
+import static 
org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy.RETRY_COUNT_DEFAULT;
+import static 
org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy.TIMESTAMP_DEFAULT;
 import static 
org.apache.jackrabbit.oak.spi.blob.osgi.SplitBlobStoreService.ONLY_STANDALONE_TARGET;
 import static 
org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils.registerMBean;
 import static 
org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils.scheduleWithFixedDelay;
@@ -67,15 +69,15 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.plugins.blob.datastore.SharedDataStoreUtils;
 import 
org.apache.jackrabbit.oak.plugins.blob.datastore.SharedDataStoreUtils.SharedStoreRecordType;
 import org.apache.jackrabbit.oak.plugins.identifier.ClusterRepositoryInfo;
-import org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy;
-import 
org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy.CleanupType;
-import 
org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategyMBean;
-import 
org.apache.jackrabbit.oak.plugins.segment.compaction.DefaultCompactionStrategyMBean;
-import org.apache.jackrabbit.oak.plugins.segment.file.FileStore;
-import org.apache.jackrabbit.oak.plugins.segment.file.FileStore.Builder;
-import org.apache.jackrabbit.oak.plugins.segment.file.FileStoreGCMonitor;
-import org.apache.jackrabbit.oak.plugins.segment.file.FileStoreStatsMBean;
-import org.apache.jackrabbit.oak.plugins.segment.file.GCMonitorMBean;
+import org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy;
+import 
org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy.CleanupType;
+import org.apache.jackrabbit.oak.segment.compaction.CompactionStrategyMBean;
+import 
org.apache.jackrabbit.oak.segment.compaction.DefaultCompactionStrategyMBean;
+import org.apache.jackrabbit.oak.segment.file.FileStore;
+import org.apache.jackrabbit.oak.segment.file.FileStore.Builder;
+import org.apache.jackrabbit.oak.segment.file.FileStoreGCMonitor;
+import org.apache.jackrabbit.oak.segment.file.FileStoreStatsMBean;
+import org.apache.jackrabbit.oak.segment.file.GCMonitorMBean;
 import org.apache.jackrabbit.oak.spi.blob.BlobStore;
 import org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore;
 import org.apache.jackrabbit.oak.spi.commit.Observable;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNotFoundException.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNotFoundException.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNotFoundException.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNotFoundException.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNotFoundException.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNotFoundException.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNotFoundException.java
 Wed Apr 20 10:34:51 2016
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import org.apache.jackrabbit.oak.api.IllegalRepositoryStateException;
 

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentOverflowException.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentOverflowException.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentOverflowException.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentOverflowException.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentOverflowException.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentOverflowException.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentOverflowException.java
 Wed Apr 20 10:34:51 2016
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 /**
  * This exception is thrown by the Segment NodeStore when an internal

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentParser.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentParser.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentParser.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentParser.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentParser.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentParser.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentParser.java
 Wed Apr 20 10:34:51 2016
@@ -17,21 +17,20 @@
  * under the License.
  */
 
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.collect.Lists.newArrayList;
 import static com.google.common.collect.Lists.newArrayListWithCapacity;
 import static java.util.Collections.singletonList;
 import static org.apache.jackrabbit.oak.api.Type.BINARY;
-import static org.apache.jackrabbit.oak.plugins.segment.ListRecord.LEVEL_SIZE;
-import static org.apache.jackrabbit.oak.plugins.segment.Segment.MEDIUM_LIMIT;
-import static 
org.apache.jackrabbit.oak.plugins.segment.Segment.RECORD_ID_BYTES;
-import static org.apache.jackrabbit.oak.plugins.segment.Segment.SMALL_LIMIT;
-import static org.apache.jackrabbit.oak.plugins.segment.SegmentVersion.V_11;
-import static 
org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.BLOCK_SIZE;
-import static 
org.apache.jackrabbit.oak.plugins.segment.Template.MANY_CHILD_NODES;
-import static 
org.apache.jackrabbit.oak.plugins.segment.Template.ZERO_CHILD_NODES;
+import static org.apache.jackrabbit.oak.segment.ListRecord.LEVEL_SIZE;
+import static org.apache.jackrabbit.oak.segment.Segment.MEDIUM_LIMIT;
+import static org.apache.jackrabbit.oak.segment.Segment.RECORD_ID_BYTES;
+import static org.apache.jackrabbit.oak.segment.Segment.SMALL_LIMIT;
+import static org.apache.jackrabbit.oak.segment.SegmentWriter.BLOCK_SIZE;
+import static org.apache.jackrabbit.oak.segment.Template.MANY_CHILD_NODES;
+import static org.apache.jackrabbit.oak.segment.Template.ZERO_CHILD_NODES;
 
 import java.util.List;
 
@@ -442,7 +441,7 @@ public class SegmentParser {
 
         // Recurse into properties
         PropertyTemplate[] propertyTemplates = template.getPropertyTemplates();
-        if (segment.getSegmentVersion().onOrAfter(V_11)) {
+        if (segment.getSegmentVersion().onOrAfter(SegmentVersion.V_11)) {
             if (propertyTemplates.length > 0) {
                 size += RECORD_ID_BYTES;
                 RecordId id = segment.readRecordId(offset + ids * 
RECORD_ID_BYTES);
@@ -505,7 +504,7 @@ public class SegmentParser {
             size += RECORD_ID_BYTES;
         }
 
-        if (segment.getSegmentVersion().onOrAfter(V_11)) {
+        if (segment.getSegmentVersion().onOrAfter(SegmentVersion.V_11)) {
             if (propertyCount > 0) {
                 RecordId listId = segment.readRecordId(offset + size);
                 size += RECORD_ID_BYTES;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentPropertyState.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentPropertyState.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentPropertyState.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentPropertyState.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentPropertyState.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentPropertyState.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentPropertyState.java
 Wed Apr 20 10:34:51 2016
@@ -1,20 +1,22 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkElementIndex;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStore.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentStore.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStore.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStore.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentStore.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentStore.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStore.java
 Wed Apr 20 10:34:51 2016
@@ -1,20 +1,22 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import java.io.IOException;
 

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStoreProvider.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/WriteOperationHandler.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStoreProvider.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStoreProvider.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/WriteOperationHandler.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/WriteOperationHandler.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStoreProvider.java
 Wed Apr 20 10:34:51 2016
@@ -16,19 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.jackrabbit.oak.segment;
 
-package org.apache.jackrabbit.oak.plugins.segment;
+public interface SegmentStoreProvider {
 
-import java.io.IOException;
-
-/**
- * FIXME OAK-3348 document
- */
-interface WriteOperationHandler {
-    interface WriteOperation {
-        RecordId execute(SegmentBufferWriter writer) throws IOException;
-    }
-
-    RecordId execute(WriteOperation writeOperation) throws IOException;
-    void flush() throws IOException;
+    SegmentStore getSegmentStore();
 }

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStream.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentStream.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStream.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStream.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentStream.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentStream.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentStream.java
 Wed Apr 20 10:34:51 2016
@@ -1,26 +1,28 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.base.Preconditions.checkPositionIndexes;
 import static com.google.common.base.Preconditions.checkState;
-import static 
org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.BLOCK_SIZE;
+import static org.apache.jackrabbit.oak.segment.SegmentWriter.BLOCK_SIZE;
 
 import java.io.IOException;
 import java.io.InputStream;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentTracker.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentTracker.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentTracker.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentTracker.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentTracker.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentTracker.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentTracker.java
 Wed Apr 20 10:34:51 2016
@@ -1,20 +1,22 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.collect.Queues.newArrayDeque;
 import static com.google.common.collect.Sets.newHashSet;
@@ -35,8 +37,8 @@ import org.apache.jackrabbit.oak.cache.C
 import org.apache.jackrabbit.oak.cache.CacheLIRS.EvictionCallback;
 import org.apache.jackrabbit.oak.cache.CacheStats;
 import org.apache.jackrabbit.oak.plugins.blob.ReferenceCollector;
-import org.apache.jackrabbit.oak.plugins.segment.compaction.CompactionStrategy;
-import org.apache.jackrabbit.oak.plugins.segment.file.FileStore;
+import org.apache.jackrabbit.oak.segment.compaction.CompactionStrategy;
+import org.apache.jackrabbit.oak.segment.file.FileStore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentVersion.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentVersion.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentVersion.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentVersion.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentVersion.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentVersion.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentVersion.java
 Wed Apr 20 10:34:51 2016
@@ -16,7 +16,8 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+
+package org.apache.jackrabbit.oak.segment;
 
 import static java.util.Collections.max;
 import static java.util.EnumSet.allOf;

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentWriter.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentWriter.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentWriter.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentWriter.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentWriter.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentWriter.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/SegmentWriter.java
 Wed Apr 20 10:34:51 2016
@@ -1,20 +1,22 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Charsets.UTF_8;
 import static com.google.common.base.Preconditions.checkArgument;
@@ -38,20 +40,12 @@ import static org.apache.jackrabbit.oak.
 import static org.apache.jackrabbit.oak.api.Type.NAME;
 import static org.apache.jackrabbit.oak.api.Type.NAMES;
 import static org.apache.jackrabbit.oak.api.Type.STRING;
-import static 
org.apache.jackrabbit.oak.plugins.segment.MapRecord.BUCKETS_PER_LEVEL;
-import static 
org.apache.jackrabbit.oak.plugins.segment.RecordWriters.newBlobIdWriter;
-import static 
org.apache.jackrabbit.oak.plugins.segment.RecordWriters.newBlockWriter;
-import static 
org.apache.jackrabbit.oak.plugins.segment.RecordWriters.newListBucketWriter;
-import static 
org.apache.jackrabbit.oak.plugins.segment.RecordWriters.newListWriter;
-import static 
org.apache.jackrabbit.oak.plugins.segment.RecordWriters.newMapBranchWriter;
-import static 
org.apache.jackrabbit.oak.plugins.segment.RecordWriters.newMapLeafWriter;
-import static 
org.apache.jackrabbit.oak.plugins.segment.RecordWriters.newNodeStateWriter;
-import static 
org.apache.jackrabbit.oak.plugins.segment.RecordWriters.newTemplateWriter;
-import static 
org.apache.jackrabbit.oak.plugins.segment.RecordWriters.newValueWriter;
-import static 
org.apache.jackrabbit.oak.plugins.segment.Segment.MAX_SEGMENT_SIZE;
-import static org.apache.jackrabbit.oak.plugins.segment.Segment.align;
-import static org.apache.jackrabbit.oak.plugins.segment.Segment.readString;
-import static org.apache.jackrabbit.oak.plugins.segment.SegmentVersion.V_11;
+import static org.apache.jackrabbit.oak.segment.MapRecord.BUCKETS_PER_LEVEL;
+import static org.apache.jackrabbit.oak.segment.RecordWriters.newBlobIdWriter;
+import static org.apache.jackrabbit.oak.segment.RecordWriters.newListWriter;
+import static 
org.apache.jackrabbit.oak.segment.RecordWriters.newMapBranchWriter;
+import static org.apache.jackrabbit.oak.segment.RecordWriters.newMapLeafWriter;
+import static org.apache.jackrabbit.oak.segment.RecordWriters.newValueWriter;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -69,8 +63,8 @@ import org.apache.jackrabbit.oak.api.Blo
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState;
-import org.apache.jackrabbit.oak.plugins.segment.RecordCache.Cache;
-import 
org.apache.jackrabbit.oak.plugins.segment.WriteOperationHandler.WriteOperation;
+import org.apache.jackrabbit.oak.segment.RecordCache.Cache;
+import org.apache.jackrabbit.oak.segment.WriteOperationHandler.WriteOperation;
 import org.apache.jackrabbit.oak.spi.blob.BlobStore;
 import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
 import org.apache.jackrabbit.oak.spi.state.DefaultNodeStateDiff;
@@ -287,7 +281,7 @@ public class SegmentWriter {
             if (base != null && base.isDiff()) {
                 Segment segment = base.getSegment();
                 RecordId key = segment.readRecordId(base.getOffset(8));
-                String name = readString(key);
+                String name = Segment.readString(key);
                 if (!changes.containsKey(name)) {
                     changes.put(name, segment.readRecordId(base.getOffset(8, 
1)));
                 }
@@ -304,7 +298,7 @@ public class SegmentWriter {
                         if (value.equals(entry.getValue())) {
                             return base.getRecordId();
                         } else {
-                            return newMapBranchWriter(entry.getHash(), 
asList(entry.getKey(),
+                            return 
RecordWriters.newMapBranchWriter(entry.getHash(), asList(entry.getKey(),
                                 value, base.getRecordId())).write(writer);
                         }
                     }
@@ -339,7 +333,7 @@ public class SegmentWriter {
             checkElementIndex(size, MapRecord.MAX_SIZE);
             checkPositionIndex(level, MapRecord.MAX_NUMBER_OF_LEVELS);
             checkArgument(size != 0 || level == 
MapRecord.MAX_NUMBER_OF_LEVELS);
-            return newMapLeafWriter(level, entries).write(writer);
+            return RecordWriters.newMapLeafWriter(level, 
entries).write(writer);
         }
 
         private RecordId writeMapBranch(int level, int size, MapRecord... 
buckets) throws IOException {
@@ -351,7 +345,7 @@ public class SegmentWriter {
                     bucketIds.add(buckets[i].getRecordId());
                 }
             }
-            return newMapBranchWriter(level, size, bitmap, 
bucketIds).write(writer);
+            return RecordWriters.newMapBranchWriter(level, size, bitmap, 
bucketIds).write(writer);
         }
 
         private RecordId writeMapBucket(MapRecord base, Collection<MapEntry> 
entries, int level)
@@ -361,7 +355,7 @@ public class SegmentWriter {
                 if (base != null) {
                     return base.getRecordId();
                 } else if (level == 0) {
-                    return newMapLeafWriter().write(writer);
+                    return RecordWriters.newMapLeafWriter().write(writer);
                 } else {
                     return null;
                 }
@@ -470,7 +464,7 @@ public class SegmentWriter {
 
         private RecordId writeListBucket(List<RecordId> bucket) throws 
IOException {
             checkArgument(bucket.size() > 1);
-            return newListBucketWriter(bucket).write(writer);
+            return RecordWriters.newListBucketWriter(bucket).write(writer);
         }
 
         private List<List<MapEntry>> splitToBuckets(Collection<MapEntry> 
entries, int level) {
@@ -493,12 +487,12 @@ public class SegmentWriter {
 
         private RecordId writeValueRecord(long length, RecordId blocks) throws 
IOException {
             long len = (length - Segment.MEDIUM_LIMIT) | (0x3L << 62);
-            return newValueWriter(blocks, len).write(writer);
+            return RecordWriters.newValueWriter(blocks, len).write(writer);
         }
 
         private RecordId writeValueRecord(int length, byte... data) throws 
IOException {
             checkArgument(length < Segment.MEDIUM_LIMIT);
-            return newValueWriter(length, data).write(writer);
+            return RecordWriters.newValueWriter(length, data).write(writer);
         }
 
         /**
@@ -527,13 +521,13 @@ public class SegmentWriter {
                 data.length / BLOCK_SIZE + 1);
 
             // write as many full bulk segments as possible
-            while (pos + MAX_SEGMENT_SIZE <= data.length) {
+            while (pos + Segment.MAX_SEGMENT_SIZE <= data.length) {
                 SegmentId bulkId = getTracker().newBulkSegmentId();
-                store.writeSegment(bulkId, data, pos, MAX_SEGMENT_SIZE);
-                for (int i = 0; i < MAX_SEGMENT_SIZE; i += BLOCK_SIZE) {
+                store.writeSegment(bulkId, data, pos, 
Segment.MAX_SEGMENT_SIZE);
+                for (int i = 0; i < Segment.MAX_SEGMENT_SIZE; i += BLOCK_SIZE) 
{
                     blockIds.add(new RecordId(bulkId, i));
                 }
-                pos += MAX_SEGMENT_SIZE;
+                pos += Segment.MAX_SEGMENT_SIZE;
             }
 
             // inline the remaining data as block records
@@ -583,16 +577,16 @@ public class SegmentWriter {
         private RecordId writeBlobId(String blobId) throws IOException {
             byte[] data = blobId.getBytes(UTF_8);
             if (data.length < Segment.BLOB_ID_SMALL_LIMIT) {
-                return newBlobIdWriter(data).write(writer);
+                return RecordWriters.newBlobIdWriter(data).write(writer);
             } else {
-                return newBlobIdWriter(writeString(blobId)).write(writer);
+                return 
RecordWriters.newBlobIdWriter(writeString(blobId)).write(writer);
             }
         }
 
         private RecordId writeBlock(byte[] bytes, int offset, int length) 
throws IOException {
             checkNotNull(bytes);
             checkPositionIndexes(offset, offset + length, bytes.length);
-            return newBlockWriter(bytes, offset, length).write(writer);
+            return RecordWriters.newBlockWriter(bytes, offset, 
length).write(writer);
         }
 
         private RecordId writeStream(InputStream stream) throws IOException {
@@ -633,8 +627,8 @@ public class SegmentWriter {
                 return writeBlobId(blobId);
             }
 
-            data = Arrays.copyOf(data, MAX_SEGMENT_SIZE);
-            n += read(stream, data, n, MAX_SEGMENT_SIZE - n);
+            data = Arrays.copyOf(data, Segment.MAX_SEGMENT_SIZE);
+            n += read(stream, data, n, Segment.MAX_SEGMENT_SIZE - n);
             long length = n;
             List<RecordId> blockIds =
                 newArrayListWithExpectedSize(2 * n / BLOCK_SIZE);
@@ -642,7 +636,7 @@ public class SegmentWriter {
             // Write the data to bulk segments and collect the list of block 
ids
             while (n != 0) {
                 SegmentId bulkId = getTracker().newBulkSegmentId();
-                int len = align(n, 1 << Segment.RECORD_ALIGN_BITS);
+                int len = Segment.align(n, 1 << Segment.RECORD_ALIGN_BITS);
                 LOG.debug("Writing bulk segment {} ({} bytes)", bulkId, n);
                 store.writeSegment(bulkId, data, 0, len);
 
@@ -688,9 +682,9 @@ public class SegmentWriter {
             if (!type.isArray()) {
                 return valueIds.iterator().next();
             } else if (count == 0) {
-                return newListWriter().write(writer);
+                return RecordWriters.newListWriter().write(writer);
             } else {
-                return newListWriter(count, writeList(valueIds)).write(writer);
+                return RecordWriters.newListWriter(count, 
writeList(valueIds)).write(writer);
             }
         }
 
@@ -753,7 +747,7 @@ public class SegmentWriter {
             }
 
             RecordId propNamesId = null;
-            if (version.onOrAfter(V_11)) {
+            if (version.onOrAfter(SegmentVersion.V_11)) {
                 if (propertyNames.length > 0) {
                     propNamesId = writeList(asList(propertyNames));
                     ids.add(propNamesId);
@@ -765,7 +759,7 @@ public class SegmentWriter {
             checkState(propertyNames.length < (1 << 18));
             head |= propertyNames.length;
 
-            RecordId tid = newTemplateWriter(ids, propertyNames,
+            RecordId tid = RecordWriters.newTemplateWriter(ids, propertyNames,
                 propertyTypes, head, primaryId, mixinIds, childNameId,
                 propNamesId, version).write(writer);
             templateCache.generation(generation()).put(template, tid);
@@ -886,7 +880,7 @@ public class SegmentWriter {
             }
 
             if (!pIds.isEmpty()) {
-                if (version.onOrAfter(V_11)) {
+                if (version.onOrAfter(SegmentVersion.V_11)) {
                     ids.add(writeList(pIds));
                 } else {
                     ids.addAll(pIds);
@@ -899,7 +893,7 @@ public class SegmentWriter {
                 byte[] id = ((Record) state).getRecordId().toArray();
                 nodeId = writeBlock(id, 0, id.length);
             }
-            return newNodeStateWriter(nodeId, ids).write(writer);
+            return RecordWriters.newNodeStateWriter(nodeId, ids).write(writer);
         }
 
         private boolean hasSegment(SegmentNodeState node) {

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/StringCache.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/StringCache.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/StringCache.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/StringCache.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/StringCache.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/StringCache.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/StringCache.java
 Wed Apr 20 10:34:51 2016
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import java.util.Arrays;
 

Copied: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/Template.java
 (from r1740105, 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/Template.java)
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/Template.java?p2=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/Template.java&p1=jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/Template.java&r1=1740105&r2=1740107&rev=1740107&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/plugins/segment/Template.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/Template.java
 Wed Apr 20 10:34:51 2016
@@ -1,27 +1,28 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.jackrabbit.oak.plugins.segment;
+package org.apache.jackrabbit.oak.segment;
 
 import static com.google.common.base.Preconditions.checkElementIndex;
 import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.base.Preconditions.checkState;
 import static 
org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.MISSING_NODE;
-import static 
org.apache.jackrabbit.oak.plugins.segment.Segment.RECORD_ID_BYTES;
-import static org.apache.jackrabbit.oak.plugins.segment.SegmentVersion.V_11;
+import static org.apache.jackrabbit.oak.segment.Segment.RECORD_ID_BYTES;
 
 import java.util.Arrays;
 import java.util.Collections;
@@ -183,7 +184,7 @@ public class Template {
             offset += RECORD_ID_BYTES;
         }
         RecordId rid = null;
-        if (segment.getSegmentVersion().onOrAfter(V_11)) {
+        if (segment.getSegmentVersion().onOrAfter(SegmentVersion.V_11)) {
             RecordId lid = segment.readRecordId(offset);
             ListRecord props = new ListRecord(lid, properties.length);
             rid = props.getEntry(index);



Reply via email to