directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1551294 - in /directory/mavibot/trunk/mavibot/src: main/java/org/apache/directory/mavibot/btree/ main/java/org/apache/directory/mavibot/btree/memory/ main/java/org/apache/directory/mavibot/btree/persisted/ test/java/org/apache/directory/ma...
Date Mon, 16 Dec 2013 18:05:31 GMT
Author: elecharny
Date: Mon Dec 16 18:05:31 2013
New Revision: 1551294

URL: http://svn.apache.org/r1551294
Log:
Mobed the MergedWithSiblingResult class in the btree package

Added:
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/MergedWithSiblingResult.java
      - copied, changed from r1551070, directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/MergedWithSiblingResult.java
Removed:
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/MergedWithSiblingResult.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/MergedWithSiblingResult.java
Modified:
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractValueHolder.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageHolder.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/BTreeConfiguration.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryLeaf.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryNode.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryValueHolder.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/PersistedLeaf.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/PersistedNode.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/LeafTest.java

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractValueHolder.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractValueHolder.java?rev=1551294&r1=1551293&r2=1551294&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractValueHolder.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractValueHolder.java
Mon Dec 16 18:05:31 2013
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.lang.reflect.Array;
 import java.util.Comparator;
 
-import org.apache.directory.mavibot.btree.persisted.PersistedBTree;
 import org.apache.directory.mavibot.btree.serializer.ElementSerializer;
 
 

Copied: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/MergedWithSiblingResult.java
(from r1551070, directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/MergedWithSiblingResult.java)
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/MergedWithSiblingResult.java?p2=directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/MergedWithSiblingResult.java&p1=directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/MergedWithSiblingResult.java&r1=1551070&r2=1551294&rev=1551294&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/MergedWithSiblingResult.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/MergedWithSiblingResult.java
Mon Dec 16 18:05:31 2013
@@ -17,15 +17,11 @@
  *  under the License.
  *
  */
-package org.apache.directory.mavibot.btree.memory;
+package org.apache.directory.mavibot.btree;
 
 
 import java.util.List;
 
-import org.apache.directory.mavibot.btree.AbstractDeleteResult;
-import org.apache.directory.mavibot.btree.Page;
-import org.apache.directory.mavibot.btree.Tuple;
-
 
 /**
  * The result of a delete operation, when the child has not been merged. It contains the
@@ -36,7 +32,7 @@ import org.apache.directory.mavibot.btre
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-/* No qualifier */class MergedWithSiblingResult<K, V> extends AbstractDeleteResult<K,
V>
+public class MergedWithSiblingResult<K, V> extends AbstractDeleteResult<K, V>
 {
     /**
      * The default constructor for RemoveResult.
@@ -44,7 +40,7 @@ import org.apache.directory.mavibot.btre
      * @param modifiedPage The modified page
      * @param removedElement The removed element (can be null if the key wasn't present in
the tree)
      */
-    /* No qualifier */MergedWithSiblingResult( Page<K, V> modifiedPage, Tuple<K,
V> removedElement )
+    public MergedWithSiblingResult( Page<K, V> modifiedPage, Tuple<K, V> removedElement
)
     {
         super( modifiedPage, removedElement );
     }
@@ -57,7 +53,7 @@ import org.apache.directory.mavibot.btre
      * @param modifiedPage The modified page
      * @param removedElement The removed element (can be null if the key wasn't present in
the tree)
      */
-    /* No qualifier */MergedWithSiblingResult( List<Page<K, V>> copiedPages,
Page<K, V> modifiedPage,
+    public MergedWithSiblingResult( List<Page<K, V>> copiedPages, Page<K,
V> modifiedPage,
         Tuple<K, V> removedElement )
     {
         super( copiedPages, modifiedPage, removedElement );

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageHolder.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageHolder.java?rev=1551294&r1=1551293&r2=1551294&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageHolder.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageHolder.java
Mon Dec 16 18:05:31 2013
@@ -19,10 +19,6 @@
  */
 package org.apache.directory.mavibot.btree;
 
-import java.io.IOException;
-
-import org.apache.directory.mavibot.btree.exception.EndOfFileExceededException;
-
 /**
  * A Page holder. It stores the page and provide a way to access it.
  * 

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/BTreeConfiguration.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/BTreeConfiguration.java?rev=1551294&r1=1551293&r2=1551294&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/BTreeConfiguration.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/BTreeConfiguration.java
Mon Dec 16 18:05:31 2013
@@ -20,7 +20,6 @@
 package org.apache.directory.mavibot.btree.memory;
 
 
-import org.apache.directory.mavibot.btree.BTree;
 import org.apache.directory.mavibot.btree.serializer.ElementSerializer;
 
 

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryLeaf.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryLeaf.java?rev=1551294&r1=1551293&r2=1551294&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryLeaf.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryLeaf.java
Mon Dec 16 18:05:31 2013
@@ -24,6 +24,7 @@ import java.io.IOException;
 import java.lang.reflect.Array;
 
 import org.apache.directory.mavibot.btree.AbstractPage;
+import org.apache.directory.mavibot.btree.MergedWithSiblingResult;
 import org.apache.directory.mavibot.btree.TupleCursor;
 import org.apache.directory.mavibot.btree.BTree;
 import org.apache.directory.mavibot.btree.BorrowedFromLeftResult;
@@ -39,7 +40,6 @@ import org.apache.directory.mavibot.btre
 import org.apache.directory.mavibot.btree.SplitResult;
 import org.apache.directory.mavibot.btree.Transaction;
 import org.apache.directory.mavibot.btree.Tuple;
-import org.apache.directory.mavibot.btree.TupleCursor;
 import org.apache.directory.mavibot.btree.ValueCursor;
 import org.apache.directory.mavibot.btree.ValueHolder;
 import org.apache.directory.mavibot.btree.exception.EndOfFileExceededException;

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryNode.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryNode.java?rev=1551294&r1=1551293&r2=1551294&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryNode.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryNode.java
Mon Dec 16 18:05:31 2013
@@ -32,6 +32,7 @@ import org.apache.directory.mavibot.btre
 import org.apache.directory.mavibot.btree.DeleteResult;
 import org.apache.directory.mavibot.btree.InsertResult;
 import org.apache.directory.mavibot.btree.KeyHolder;
+import org.apache.directory.mavibot.btree.MergedWithSiblingResult;
 import org.apache.directory.mavibot.btree.ModifyResult;
 import org.apache.directory.mavibot.btree.NotPresentResult;
 import org.apache.directory.mavibot.btree.Page;
@@ -592,7 +593,7 @@ import org.apache.directory.mavibot.btre
         // an element from the local page, and to deal with the result.
         if ( deleteResult instanceof MergedWithSiblingResult )
         {
-            MergedWithSiblingResult<K, V> mergedResult = ( MergedWithSiblingResult<K,
V> ) deleteResult;
+            MergedWithSiblingResult<K, V> mergedResult = (org.apache.directory.mavibot.btree.MergedWithSiblingResult<K,
V> ) deleteResult;
 
             // If the parent is null, then this page is the root page.
             if ( parent == null )

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryValueHolder.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryValueHolder.java?rev=1551294&r1=1551293&r2=1551294&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryValueHolder.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/InMemoryValueHolder.java
Mon Dec 16 18:05:31 2013
@@ -29,7 +29,6 @@ import org.apache.directory.mavibot.btre
 import org.apache.directory.mavibot.btree.BTree;
 import org.apache.directory.mavibot.btree.Tuple;
 import org.apache.directory.mavibot.btree.exception.EndOfFileExceededException;
-import org.apache.directory.mavibot.btree.persisted.PersistedBTree;
 
 
 /**

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/PersistedLeaf.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/PersistedLeaf.java?rev=1551294&r1=1551293&r2=1551294&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/PersistedLeaf.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/PersistedLeaf.java
Mon Dec 16 18:05:31 2013
@@ -24,6 +24,7 @@ import java.io.IOException;
 import java.lang.reflect.Array;
 
 import org.apache.directory.mavibot.btree.AbstractPage;
+import org.apache.directory.mavibot.btree.MergedWithSiblingResult;
 import org.apache.directory.mavibot.btree.TupleCursor;
 import org.apache.directory.mavibot.btree.BTree;
 import org.apache.directory.mavibot.btree.BorrowedFromLeftResult;
@@ -39,7 +40,6 @@ import org.apache.directory.mavibot.btre
 import org.apache.directory.mavibot.btree.SplitResult;
 import org.apache.directory.mavibot.btree.Transaction;
 import org.apache.directory.mavibot.btree.Tuple;
-import org.apache.directory.mavibot.btree.TupleCursor;
 import org.apache.directory.mavibot.btree.ValueCursor;
 import org.apache.directory.mavibot.btree.ValueHolder;
 import org.apache.directory.mavibot.btree.exception.EndOfFileExceededException;
@@ -344,8 +344,7 @@ import org.apache.directory.mavibot.btre
         }
 
         // And create the result
-        DeleteResult<K, V> result = new MergedWithSiblingResult<K, V>( newLeaf,
-            removedElement );
+        DeleteResult<K, V> result = new MergedWithSiblingResult<K, V>( newLeaf,
removedElement );
 
         result.addCopiedPage( this );
         result.addCopiedPage( sibling );

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/PersistedNode.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/PersistedNode.java?rev=1551294&r1=1551293&r2=1551294&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/PersistedNode.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/PersistedNode.java
Mon Dec 16 18:05:31 2013
@@ -32,6 +32,7 @@ import org.apache.directory.mavibot.btre
 import org.apache.directory.mavibot.btree.DeleteResult;
 import org.apache.directory.mavibot.btree.InsertResult;
 import org.apache.directory.mavibot.btree.KeyHolder;
+import org.apache.directory.mavibot.btree.MergedWithSiblingResult;
 import org.apache.directory.mavibot.btree.ModifyResult;
 import org.apache.directory.mavibot.btree.NotPresentResult;
 import org.apache.directory.mavibot.btree.Page;

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/LeafTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/LeafTest.java?rev=1551294&r1=1551293&r2=1551294&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/LeafTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/LeafTest.java
Mon Dec 16 18:05:31 2013
@@ -32,6 +32,7 @@ import org.apache.directory.mavibot.btre
 import org.apache.directory.mavibot.btree.DeleteResult;
 import org.apache.directory.mavibot.btree.InsertResult;
 import org.apache.directory.mavibot.btree.KeyHolder;
+import org.apache.directory.mavibot.btree.MergedWithSiblingResult;
 import org.apache.directory.mavibot.btree.NotPresentResult;
 import org.apache.directory.mavibot.btree.Page;
 import org.apache.directory.mavibot.btree.PageHolder;
@@ -404,7 +405,7 @@ public class LeafTest
 
         assertTrue( result instanceof MergedWithSiblingResult );
 
-        MergedWithSiblingResult<Long, String> merged = ( MergedWithSiblingResult<Long,
String> ) result;
+        MergedWithSiblingResult<Long, String> merged = (org.apache.directory.mavibot.btree.MergedWithSiblingResult<Long,
String> ) result;
         Tuple<Long, String> removedKey = merged.getRemovedElement();
 
         assertEquals( Long.valueOf( 7L ), removedKey.getKey() );



Mime
View raw message