directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1379377 - in /directory/apacheds/branches/apacheds-mvbt: jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ xdbm...
Date Fri, 31 Aug 2012 09:22:08 GMT
Author: elecharny
Date: Fri Aug 31 09:22:07 2012
New Revision: 1379377

URL: http://svn.apache.org/viewvc?rev=1379377&view=rev
Log:
o Removed the generic from the MasterTable classes and its heirarchy, as we always store entries
into it.

Modified:
    directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java
    directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTableTest.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/MasterTable.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java

Modified: directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java?rev=1379377&r1=1379376&r2=1379377&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java
Fri Aug 31 09:22:07 2012
@@ -27,6 +27,7 @@ import jdbm.helper.Serializer;
 import jdbm.helper.StringComparator;
 
 import org.apache.directory.server.xdbm.MasterTable;
+import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.comparators.SerializableComparator;
 import org.apache.directory.shared.ldap.model.schema.comparators.UuidComparator;
@@ -37,7 +38,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class JdbmMasterTable<E> extends JdbmTable<String, E> implements MasterTable<E>
+public class JdbmMasterTable extends JdbmTable<String, Entry> implements MasterTable
 {
     private static final StringComparator STRCOMP = new StringComparator();
 
@@ -60,7 +61,7 @@ public class JdbmMasterTable<E> extends 
      * Creates the master table using JDBM B+Trees for the backing store.
      *
      * @param recMan the JDBM record manager
-     * @param schemaManager the schema mamanger
+     * @param schemaManager the schema manager
      * @throws Exception if there is an error opening the Db file.
      */
     public JdbmMasterTable( RecordManager recMan, SchemaManager schemaManager ) throws Exception
@@ -104,7 +105,7 @@ public class JdbmMasterTable<E> extends 
      * @throws Exception if the admin table storing sequences cannot be
      *                         read and written to.
      */
-    public String getNextId( E entry ) throws Exception
+    public String getNextId( Entry entry ) throws Exception
     {
         return UUID.randomUUID().toString();
     }

Modified: directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=1379377&r1=1379376&r2=1379377&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
Fri Aug 31 09:22:07 2012
@@ -144,7 +144,7 @@ public class JdbmPartition extends Abstr
             }
 
             // Create the master table (the table containing all the entries)
-            master = new JdbmMasterTable<Entry>( recMan, schemaManager );
+            master = new JdbmMasterTable( recMan, schemaManager );
 
             // get all index db files first
             File[] allIndexDbFiles = partitionDir.listFiles( DB_FILTER );
@@ -238,7 +238,7 @@ public class JdbmPartition extends Abstr
             idx.sync();
         }
 
-        ( ( JdbmMasterTable<Entry> ) master ).sync();
+        ( ( JdbmMasterTable ) master ).sync();
         recMan.commit();
     }
 

Modified: directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTableTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTableTest.java?rev=1379377&r1=1379376&r2=1379377&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTableTest.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTableTest.java
Fri Aug 31 09:22:07 2012
@@ -29,7 +29,6 @@ import java.io.File;
 import jdbm.RecordManager;
 import jdbm.recman.BaseRecordManager;
 
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schemaextractor.SchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schemaextractor.impl.DefaultSchemaLdifExtractor;
@@ -54,7 +53,7 @@ public class JdbmMasterTableTest
     private static final Logger LOG = LoggerFactory.getLogger( JdbmMasterTableTest.class.getSimpleName()
);
     private static final String TEST_OUTPUT_PATH = "test.output.path";
 
-    JdbmMasterTable<Entry> table;
+    JdbmMasterTable table;
     File dbFile;
     RecordManager recman;
     SchemaManager schemaManager = null;
@@ -100,10 +99,10 @@ public class JdbmMasterTableTest
         dbFile = File.createTempFile( getClass().getSimpleName(), "db", tmpDir );
         recman = new BaseRecordManager( dbFile.getAbsolutePath() );
 
-        table = new JdbmMasterTable<Entry>( recman, schemaManager );
+        table = new JdbmMasterTable( recman, schemaManager );
         LOG.debug( "Created new table and populated it with data" );
 
-        JdbmMasterTable<Entry> t2 = new JdbmMasterTable<Entry>( recman, schemaManager
);
+        JdbmMasterTable t2 = new JdbmMasterTable( recman, schemaManager );
         t2.close();
     }
 

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java?rev=1379377&r1=1379376&r2=1379377&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
Fri Aug 31 09:22:07 2012
@@ -89,7 +89,7 @@ public class AvlPartition extends Abstra
             }
 
             // Create the master table (the table containing all the entries)
-            master = new AvlMasterTable<Entry>( id, UuidComparator.INSTANCE, null,
false );
+            master = new AvlMasterTable( id, UuidComparator.INSTANCE, null, false );
 
             super.doInit();
         }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java?rev=1379377&r1=1379376&r2=1379377&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
Fri Aug 31 09:22:07 2012
@@ -130,7 +130,7 @@ public abstract class AbstractBTreeParti
     private Set<Index<?, Entry, String>> indexedAttributes;
 
     /** the master table storing entries by primary key */
-    protected MasterTable<Entry> master;
+    protected MasterTable master;
 
     /** a map of attributeType numeric UUID to user userIndices */
     protected Map<String, Index<?, Entry, String>> userIndices = new HashMap<String,
Index<?, Entry, String>>();
@@ -2719,7 +2719,7 @@ public abstract class AbstractBTreeParti
     /**
      * {@inheritDoc}
      */
-    public MasterTable<Entry> getMasterTable()
+    public MasterTable getMasterTable()
     {
         return master;
     }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/MasterTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/MasterTable.java?rev=1379377&r1=1379376&r2=1379377&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/MasterTable.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/MasterTable.java
Fri Aug 31 09:22:07 2012
@@ -20,6 +20,7 @@
 package org.apache.directory.server.xdbm;
 
 
+import org.apache.directory.shared.ldap.model.entry.Entry;
 
 
 /**
@@ -27,7 +28,7 @@ package org.apache.directory.server.xdbm
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface MasterTable<E> extends Table<String, E>
+public interface MasterTable extends Table<String, Entry>
 {
     /** the base name for the db file for this table */
     String DBF = "master";
@@ -44,5 +45,5 @@ public interface MasterTable<E> extends 
      * @return the current value of this MasterTable's sequence incremented by one
      * @throws Exception on failure to update the id sequence
      */
-    String getNextId( E entry ) throws Exception;
+    String getNextId( Entry entry ) throws Exception;
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java?rev=1379377&r1=1379376&r2=1379377&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
Fri Aug 31 09:22:07 2012
@@ -441,5 +441,5 @@ public interface Store<E>
      * Expose the Master table
      * @return The masterTable instance
      */
-    MasterTable<E> getMasterTable();
+    MasterTable getMasterTable();
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java?rev=1379377&r1=1379376&r2=1379377&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java
Fri Aug 31 09:22:07 2012
@@ -24,6 +24,7 @@ import java.util.Comparator;
 import java.util.UUID;
 
 import org.apache.directory.server.xdbm.MasterTable;
+import org.apache.directory.shared.ldap.model.entry.Entry;
 
 
 /**
@@ -32,9 +33,9 @@ import org.apache.directory.server.xdbm.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AvlMasterTable<E> extends AvlTable<String, E> implements MasterTable<E>
+public class AvlMasterTable extends AvlTable<String, Entry> implements MasterTable
 {
-    public AvlMasterTable( String name, Comparator<String> keyComparator, Comparator<E>
valComparator,
+    public AvlMasterTable( String name, Comparator<String> keyComparator, Comparator<Entry>
valComparator,
         boolean dupsEnabled )
     {
         super( name, keyComparator, valComparator, dupsEnabled );
@@ -44,7 +45,7 @@ public class AvlMasterTable<E> extends A
     /**
      * {@inheritDoc}
      */
-    public String getNextId( E entry ) throws Exception
+    public String getNextId( Entry entry ) throws Exception
     {
         return UUID.randomUUID().toString();
     }



Mime
View raw message