directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1538535 - in /directory/mavibot/trunk/mavibot/src: main/java/org/apache/directory/mavibot/btree/managed/ test/java/org/apache/directory/mavibot/btree/managed/
Date Mon, 04 Nov 2013 09:21:15 GMT
Author: elecharny
Date: Mon Nov  4 09:21:15 2013
New Revision: 1538535

URL: http://svn.apache.org/r1538535
Log:
Used TupleCursor instead of CursorImpl

Modified:
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/BTree.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Node.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Page.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/managed/RecordManagerTest.java

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/BTree.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/BTree.java?rev=1538535&r1=1538534&r2=1538535&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/BTree.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/BTree.java
Mon Nov  4 09:21:15 2013
@@ -876,7 +876,7 @@ public class BTree<K, V> implements Clos
         // Fetch the root page for this revision
         LinkedList<ParentPos<K, V>> stack = new LinkedList<ParentPos<K,
V>>();
 
-        CursorImpl<K, V> cursor = rootPage.browse( transaction, stack );
+        TupleCursor<K, V> cursor = rootPage.browse( transaction, stack );
 
         return cursor;
     }
@@ -890,7 +890,7 @@ public class BTree<K, V> implements Clos
      * @throws IOException If we had an issue while fetching data from the disk
      * @throws KeyNotFoundException If the key is not found in the BTree
      */
-    public CursorImpl<K, V> browse( long revision ) throws IOException, KeyNotFoundException
+    public TupleCursor<K, V> browse( long revision ) throws IOException, KeyNotFoundException
     {
         Transaction<K, V> transaction = beginReadTransaction();
 
@@ -899,7 +899,7 @@ public class BTree<K, V> implements Clos
 
         // And get the cursor
         LinkedList<ParentPos<K, V>> stack = new LinkedList<ParentPos<K,
V>>();
-        CursorImpl<K, V> cursor = revisionRootPage.browse( transaction, stack );
+        TupleCursor<K, V> cursor = revisionRootPage.browse( transaction, stack );
 
         return cursor;
     }
@@ -913,12 +913,12 @@ public class BTree<K, V> implements Clos
      * @return A cursor on the btree
      * @throws IOException
      */
-    public CursorImpl<K, V> browseFrom( K key ) throws IOException
+    public TupleCursor<K, V> browseFrom( K key ) throws IOException
     {
         Transaction<K, V> transaction = beginReadTransaction();
 
         // Fetch the root page for this revision
-        CursorImpl<K, V> cursor = rootPage.browse( key, transaction, new LinkedList<ParentPos<K,
V>>() );
+        TupleCursor<K, V> cursor = rootPage.browse( key, transaction, new LinkedList<ParentPos<K,
V>>() );
 
         return cursor;
     }
@@ -934,7 +934,7 @@ public class BTree<K, V> implements Clos
      * @throws IOException If wxe had an issue reading the BTree from disk
      * @throws KeyNotFoundException  If we can't find a rootPage for this revision
      */
-    public CursorImpl<K, V> browseFrom( long revision, K key ) throws IOException,
KeyNotFoundException
+    public TupleCursor<K, V> browseFrom( long revision, K key ) throws IOException,
KeyNotFoundException
     {
         Transaction<K, V> transaction = beginReadTransaction();
 
@@ -943,7 +943,7 @@ public class BTree<K, V> implements Clos
 
         // And get the cursor
         LinkedList<ParentPos<K, V>> stack = new LinkedList<ParentPos<K,
V>>();
-        CursorImpl<K, V> cursor = revisionRootPage.browse( key, transaction, stack
);
+        TupleCursor<K, V> cursor = revisionRootPage.browse( key, transaction, stack
);
 
         return cursor;
     }

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Node.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Node.java?rev=1538535&r1=1538534&r2=1538535&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Node.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Node.java
Mon Nov  4 09:21:15 2013
@@ -26,6 +26,7 @@ import java.util.LinkedList;
 import java.util.List;
 
 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.exception.EndOfFileExceededException;
 import org.apache.directory.mavibot.btree.exception.KeyNotFoundException;
@@ -967,7 +968,7 @@ import org.apache.directory.mavibot.btre
     /**
      * {@inheritDoc}
      */
-    public CursorImpl<K, V> browse( K key, Transaction<K, V> transaction, LinkedList<ParentPos<K,
V>> stack )
+    public TupleCursor<K, V> browse( K key, Transaction<K, V> transaction, LinkedList<ParentPos<K,
V>> stack )
         throws IOException
     {
         int pos = findPos( key );
@@ -987,7 +988,7 @@ import org.apache.directory.mavibot.btre
     /**
      * {@inheritDoc}
      */
-    public CursorImpl<K, V> browse( Transaction<K, V> transaction, LinkedList<ParentPos<K,
V>> stack )
+    public TupleCursor<K, V> browse( Transaction<K, V> transaction, LinkedList<ParentPos<K,
V>> stack )
         throws IOException
     {
         stack.push( new ParentPos<K, V>( this, 0 ) );

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Page.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Page.java?rev=1538535&r1=1538534&r2=1538535&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Page.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Page.java
Mon Nov  4 09:21:15 2013
@@ -24,6 +24,7 @@ import java.io.IOException;
 import java.util.LinkedList;
 
 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.exception.EndOfFileExceededException;
 import org.apache.directory.mavibot.btree.exception.KeyNotFoundException;
@@ -135,7 +136,7 @@ import org.apache.directory.mavibot.btre
      * @return A Cursor to browse the next elements
      * @throws IOException If we have an error while trying to access the page
      */
-    CursorImpl<K, V> browse( K key, Transaction<K, V> transaction, LinkedList<ParentPos<K,
V>> stack )
+    TupleCursor<K, V> browse( K key, Transaction<K, V> transaction, LinkedList<ParentPos<K,
V>> stack )
         throws IOException;
 
 
@@ -147,7 +148,7 @@ import org.apache.directory.mavibot.btre
      * @return A Cursor to browse the next elements
      * @throws IOException If we have an error while trying to access the page
      */
-    CursorImpl<K, V> browse( Transaction<K, V> transaction, LinkedList<ParentPos<K,
V>> stack )
+    TupleCursor<K, V> browse( Transaction<K, V> transaction, LinkedList<ParentPos<K,
V>> stack )
         throws EndOfFileExceededException, IOException;
 
 

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/managed/RecordManagerTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/managed/RecordManagerTest.java?rev=1538535&r1=1538534&r2=1538535&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/managed/RecordManagerTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/managed/RecordManagerTest.java
Mon Nov  4 09:21:15 2013
@@ -35,6 +35,7 @@ import java.util.Set;
 import java.util.UUID;
 
 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.exception.BTreeAlreadyManagedException;
 import org.apache.directory.mavibot.btree.exception.KeyNotFoundException;
@@ -316,7 +317,7 @@ public class RecordManagerTest
         throws IOException,
         KeyNotFoundException
     {
-        CursorImpl<Long, String> cursor = btree.browse( revision );
+        TupleCursor<Long, String> cursor = btree.browse( revision );
         List<Long> expected = new ArrayList<Long>( values.length );
         Set<Long> found = new HashSet<Long>( values.length );
 
@@ -348,7 +349,7 @@ public class RecordManagerTest
         throws IOException,
         KeyNotFoundException
     {
-        CursorImpl<Long, String> cursor = btree.browseFrom( revision, from );
+        TupleCursor<Long, String> cursor = btree.browseFrom( revision, from );
         List<Long> expected = new ArrayList<Long>( values.length );
         Set<Long> found = new HashSet<Long>( values.length );
 



Mime
View raw message