directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1031853 [3/3] - in /directory/sandbox/seelmann/hbase-partition: ./ src/main/java/org/apache/directory/server/core/partition/hbase/ src/main/java/org/apache/directory/server/core/partition/hbase/cursor/ src/main/java/org/apache/directory/se...
Date Fri, 05 Nov 2010 22:15:24 GMT
Modified: directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/xdbmext/ExtendedSubtreeScopeCursor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/xdbmext/ExtendedSubtreeScopeCursor.java?rev=1031853&r1=1031852&r2=1031853&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/xdbmext/ExtendedSubtreeScopeCursor.java
(original)
+++ directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/xdbmext/ExtendedSubtreeScopeCursor.java
Fri Nov  5 22:15:23 2010
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.hbase.xdbmext;
 
 
-import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.xdbm.AbstractIndexCursor;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.IndexCursor;
@@ -29,6 +28,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.search.impl.AllEntriesCursor;
 import org.apache.directory.server.xdbm.search.impl.SubtreeScopeEvaluator;
 import org.apache.directory.shared.ldap.cursor.InvalidCursorPositionException;
+import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 
 
@@ -39,24 +39,24 @@ import org.apache.directory.shared.ldap.
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ExtendedSubtreeScopeCursor<ID> extends AbstractIndexCursor<ID, ServerEntry,
ID>
+public class ExtendedSubtreeScopeCursor<ID extends Comparable<ID>> extends AbstractIndexCursor<ID,
Entry, ID>
 {
     private static final String UNSUPPORTED_MSG = "Scope Cursors are not ordered and do not
support positioning by element.";
 
     /** The Entry database/store */
-    private final Store<ServerEntry, ID> db;
+    private final Store<Entry, ID> db;
 
     /** A ScopeNode Evaluator */
-    private final SubtreeScopeEvaluator<ServerEntry, ID> evaluator;
+    private final SubtreeScopeEvaluator<Entry, ID> evaluator;
 
     /** A Cursor over the entries in the scope of the search base */
-    private final IndexCursor<ID, ServerEntry, ID> scopeCursor;
+    private final IndexCursor<ID, Entry, ID> scopeCursor;
 
     /** A Cursor over entries brought into scope by alias dereferencing */
-    private final IndexCursor<ID, ServerEntry, ID> dereferencedCursor;
+    private final IndexCursor<ID, Entry, ID> dereferencedCursor;
 
     /** Currently active Cursor: we switch between two cursors */
-    private IndexCursor<ID, ServerEntry, ID> cursor;
+    private IndexCursor<ID, Entry, ID> cursor;
 
     /** Whether or not this Cursor is positioned so an entry is available */
     private boolean available = false;
@@ -72,16 +72,16 @@ public class ExtendedSubtreeScopeCursor<
      * @param evaluator an IndexEntry (candidate) evaluator
      * @throws Exception on db access failures
      */
-    public ExtendedSubtreeScopeCursor( Store<ServerEntry, ID> db, ExprNode filter,
-        SubtreeScopeEvaluator<ServerEntry, ID> evaluator ) throws Exception
+    public ExtendedSubtreeScopeCursor( Store<Entry, ID> db, ExprNode filter,
+        SubtreeScopeEvaluator<Entry, ID> evaluator ) throws Exception
     {
         this.db = db;
         this.evaluator = evaluator;
 
-        Index<ID, ServerEntry, ID> subLevelIndex = db.getSubLevelIndex();
+        Index<ID, Entry, ID> subLevelIndex = db.getSubLevelIndex();
         if ( subLevelIndex instanceof IndexFilteringExtension<?, ?, ?> )
         {
-            IndexFilteringExtension<ID, ServerEntry, ID> filteringIndex = ( IndexFilteringExtension<ID,
ServerEntry, ID> ) subLevelIndex;
+            IndexFilteringExtension<ID, Entry, ID> filteringIndex = ( IndexFilteringExtension<ID,
Entry, ID> ) subLevelIndex;
             scopeCursor = filteringIndex.forwardFilteringCursor( evaluator.getBaseId(), filter
);
         }
         else if ( evaluator.getBaseId().equals( getContextEntryId() ) )
@@ -110,7 +110,7 @@ public class ExtendedSubtreeScopeCursor<
         {
             try
             {
-                this.contextEntryId = db.getEntryId( db.getSuffix().getNormName() );
+                this.contextEntryId = db.getEntryId( db.getSuffixDn() );
             }
             catch ( Exception e )
             {
@@ -140,7 +140,7 @@ public class ExtendedSubtreeScopeCursor<
     }
 
 
-    public void before( IndexEntry<ID, ServerEntry, ID> element ) throws Exception
+    public void before( IndexEntry<ID, Entry, ID> element ) throws Exception
     {
         throw new UnsupportedOperationException( UNSUPPORTED_MSG );
     }
@@ -152,7 +152,7 @@ public class ExtendedSubtreeScopeCursor<
     }
 
 
-    public void after( IndexEntry<ID, ServerEntry, ID> element ) throws Exception
+    public void after( IndexEntry<ID, Entry, ID> element ) throws Exception
     {
         throw new UnsupportedOperationException( UNSUPPORTED_MSG );
     }
@@ -329,7 +329,7 @@ public class ExtendedSubtreeScopeCursor<
     }
 
 
-    public IndexEntry<ID, ServerEntry, ID> get() throws Exception
+    public IndexEntry<ID, Entry, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
         if ( available )



Mime
View raw message