directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r809852 - in /directory/apacheds/branches/apacheds-schema: ./ core/src/main/java/org/apache/directory/server/core/ core/src/main/java/org/apache/directory/server/core/partition/ core/src/main/java/org/apache/directory/server/core/partition/...
Date Tue, 01 Sep 2009 06:44:34 GMT
Author: akarasulu
Date: Tue Sep  1 06:44:32 2009
New Revision: 809852

URL: http://svn.apache.org/viewvc?rev=809852&view=rev
Log:
creating new jdbm-partition module to decouple core from JDBM partition

Added:
    directory/apacheds/branches/apacheds-schema/jdbm-partition/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/pom.xml
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/resources/
Modified:
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/apacheds/branches/apacheds-schema/pom.xml

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=809852&r1=809851&r2=809852&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Tue Sep  1 06:44:32 2009
@@ -50,12 +50,13 @@
 import org.apache.directory.server.core.journal.JournalInterceptor;
 import org.apache.directory.server.core.normalization.NormalizationInterceptor;
 import org.apache.directory.server.core.operational.OperationalAttributeInterceptor;
+
 import org.apache.directory.server.core.partition.DefaultPartitionNexus;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
 import org.apache.directory.server.xdbm.Index;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
+
 import org.apache.directory.server.core.referral.ReferralInterceptor;
 import org.apache.directory.server.core.replication.ReplicationConfiguration;
 import org.apache.directory.server.core.schema.PartitionSchemaLoader;
@@ -132,7 +133,7 @@
     private Registries registries;
     
     /** the root nexus */
-    private DefaultPartitionNexus partitionNexus;
+    private PartitionNexus partitionNexus;
 
     /** whether or not server is started for the first time */
     private boolean firstStart;
@@ -976,6 +977,7 @@
         // --------------------------------------------------------------------
         // Shutdown the partition
         // --------------------------------------------------------------------
+
         partitionNexus.sync();
         partitionNexus.destroy();
         
@@ -1473,7 +1475,7 @@
 
         // @TODO implement the LDIF schema partition here and set it up
         
-        JdbmPartition schemaPartition = null;
+        Partition schemaPartition = null;
         
         // this is really dumb but ...
         // just bail but do so so we don't dead code complaint for now
@@ -1503,7 +1505,7 @@
         {
             if ( partition instanceof BTreePartition )
             {
-                JdbmPartition btpconf = ( JdbmPartition ) partition;
+                BTreePartition btpconf = ( BTreePartition ) partition;
                 for ( Index<?,ServerEntry> index : btpconf.getIndexedAttributes() )
                 {
                     String schemaName = null;
@@ -1553,6 +1555,7 @@
         adminDn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         adminSession = new DefaultCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG
), this );
 
+        // @TODO - NOTE: Need to find a way to instantiate without dependency on DPN
         partitionNexus = new DefaultPartitionNexus( new DefaultServerEntry( registries, LdapDN.EMPTY_LDAPDN
) );
         partitionNexus.init( this );
         partitionNexus.addContextPartition( new AddContextPartitionOperationContext( adminSession,
schemaPartition ) );

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=809852&r1=809851&r2=809852&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Tue Sep  1 06:44:32 2009
@@ -182,7 +182,7 @@
             SyncInfoValueControl.CONTROL_OID,
             SyncRequestValueControl.CONTROL_OID,
             SyncStateValueControl.CONTROL_OID 
-            );
+        );
 
         // Add the objectClasses
         rootDSE.put( SchemaConstants.OBJECT_CLASS_AT,

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=809852&r1=809851&r2=809852&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
Tue Sep  1 06:44:32 2009
@@ -93,6 +93,7 @@
     
     /** The rootDSE context */
     protected ServerEntry contextEntry;
+	private Set<Index<?,ServerEntry>> indexedAttributes;
 
 
     // ------------------------------------------------------------------------
@@ -105,6 +106,7 @@
      */
     protected BTreePartition()
     {
+        indexedAttributes = new HashSet<Index<?,ServerEntry>>();
     }
 
     
@@ -112,6 +114,18 @@
     // C O N F I G U R A T I O N   M E T H O D S
     // ------------------------------------------------------------------------
 
+    
+    public void setIndexedAttributes( Set<Index<?,ServerEntry>> indexedAttributes
)
+    {
+        this.indexedAttributes = indexedAttributes;
+    }
+
+
+    public Set<Index<?,ServerEntry>> getIndexedAttributes()
+    {
+        return indexedAttributes;
+    }
+
 
     /**
      * Used to specify the entry cache size for a Partition.  Various Partition

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=809852&r1=809851&r2=809852&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
Tue Sep  1 06:44:32 2009
@@ -68,21 +68,14 @@
 {
     private JdbmStore<ServerEntry> store;
     private boolean optimizerEnabled = true;
-    private Set<Index<?,ServerEntry>> indexedAttributes;
-
     
-    // ------------------------------------------------------------------------
-    // C O N S T R U C T O R S
-    // ------------------------------------------------------------------------
-
-
+    
     /**
      * Creates a store based on JDBM B+Trees.
      */
     public JdbmPartition()
     {
         store = new JdbmStore<ServerEntry>();
-        indexedAttributes = new HashSet<Index<?,ServerEntry>>();
     }
 
 
@@ -97,18 +90,6 @@
     }
 
 
-    public void setIndexedAttributes( Set<Index<?,ServerEntry>> indexedAttributes
)
-    {
-        this.indexedAttributes = indexedAttributes;
-    }
-
-
-    public Set<Index<?,ServerEntry>> getIndexedAttributes()
-    {
-        return indexedAttributes;
-    }
-
-
     public boolean isOptimizerEnabled()
     {
         return optimizerEnabled;
@@ -182,7 +163,7 @@
 
         Set<Index<?,ServerEntry>> userIndices = new HashSet<Index<?,ServerEntry>>();
         
-        for ( Index<?,ServerEntry> obj : indexedAttributes )
+        for ( Index<?,ServerEntry> obj : getIndexedAttributes() )
         {
             Index<?,ServerEntry> index;
 

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=809852&r1=809851&r2=809852&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
Tue Sep  1 06:44:32 2009
@@ -27,7 +27,7 @@
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
+import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -70,7 +70,7 @@
     private Registries registries;
 
     /** a handle on the schema partition */
-    private JdbmPartition schemaPartition;
+    private Partition schemaPartition;
 
     /** schema operation control */
     private SchemaOperationControl schemaControl;
@@ -89,7 +89,7 @@
      * @param schemaControl The schema control instance
      * @throws NamingException If somethi,ng went wrong during initialization
      */
-    public SchemaService( DirectoryService directoryService, JdbmPartition schemaPartition,
SchemaOperationControl schemaControl ) throws NamingException
+    public SchemaService( DirectoryService directoryService, Partition schemaPartition, SchemaOperationControl
schemaControl ) throws NamingException
     {
         this.registries = directoryService.getRegistries();
         this.schemaPartition = schemaPartition;

Added: directory/apacheds/branches/apacheds-schema/jdbm-partition/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/jdbm-partition/pom.xml?rev=809852&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-schema/jdbm-partition/pom.xml (added)
+++ directory/apacheds/branches/apacheds-schema/jdbm-partition/pom.xml Tue Sep  1 06:44:32
2009
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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
+  
+  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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>apacheds-parent</artifactId>
+    <version>1.5.6-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-jdbm-partition</artifactId>
+  <name>ApacheDS JDBM Partition</name>
+
+  <description>
+    JDBM BTree backed partition implementation.
+  </description>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-core</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+  </dependencies>
+
+  <packaging>jar</packaging>
+</project>
+

Modified: directory/apacheds/branches/apacheds-schema/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/pom.xml?rev=809852&r1=809851&r2=809852&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/pom.xml (original)
+++ directory/apacheds/branches/apacheds-schema/pom.xml Tue Sep  1 06:44:32 2009
@@ -332,9 +332,10 @@
 
   <modules>
     <module>all</module>
-    <module>jdbm</module>
     <module>utils</module>
+    <module>jdbm</module>
     <module>jdbm-store</module>
+    <module>jdbm-partition</module>
     <module>xdbm-base</module>
     <module>xdbm-search</module>
     <module>xdbm-tools</module>



Mime
View raw message