directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r761697 - in /directory/apacheds/branches/ldif-partition: core/src/main/java/org/apache/directory/server/core/impl/ core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ core/src/test/java/org/apache/directory/serve...
Date Fri, 03 Apr 2009 14:40:58 GMT
Author: akarasulu
Date: Fri Apr  3 14:40:57 2009
New Revision: 761697

URL: http://svn.apache.org/viewvc?rev=761697&view=rev
Log:
removing getCacheSize() and getWkDirPath() from Index interface

Added:
    directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/NoNormalizerOnIndexException.java
Modified:
    directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/impl/DefaultDirectoryService.java
    directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/branches/ldif-partition/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
    directory/apacheds/branches/ldif-partition/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
    directory/apacheds/branches/ldif-partition/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/apacheds/branches/ldif-partition/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
    directory/apacheds/branches/ldif-partition/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
    directory/apacheds/branches/ldif-partition/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
    directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
    directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java
    directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
    directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java
    directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/search/IndexedNegationSearchIT.java
    directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
    directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java
    directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Index.java
    directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java
    directory/apacheds/branches/ldif-partition/xdbm-base/src/test/java/org/apache/directory/server/xdbm/XdbmFactory.java

Modified: directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/impl/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/impl/DefaultDirectoryService.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/impl/DefaultDirectoryService.java
(original)
+++ directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/impl/DefaultDirectoryService.java
Fri Apr  3 14:40:57 2009
@@ -1344,7 +1344,7 @@
                 ResultCodeEnum.OTHER );
         }
 
-        Set<Index<?,ServerEntry>> indexedAttributes = new HashSet<Index<?,ServerEntry>>();
+        Set<JdbmIndex<?,ServerEntry>> indexedAttributes = new HashSet<JdbmIndex<?,ServerEntry>>();
         
         for ( String attributeId : listing.getIndexedAttributes() )
         {

Modified: directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
(original)
+++ directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
Fri Apr  3 14:40:57 2009
@@ -68,7 +68,7 @@
 {
     private JdbmStore<ServerEntry> store;
     private boolean optimizerEnabled = true;
-    private Set<Index<?,ServerEntry>> indexedAttributes;
+    private Set<JdbmIndex<?,ServerEntry>> indexedAttributes;
 
     
     // ------------------------------------------------------------------------
@@ -82,7 +82,7 @@
     public JdbmPartition()
     {
         store = new JdbmStore<ServerEntry>();
-        indexedAttributes = new HashSet<Index<?,ServerEntry>>();
+        indexedAttributes = new HashSet<JdbmIndex<?,ServerEntry>>();
     }
 
 
@@ -103,13 +103,13 @@
     }
 
 
-    public void setIndexedAttributes( Set<Index<?,ServerEntry>> indexedAttributes
)
+    public void setIndexedAttributes( Set<JdbmIndex<?,ServerEntry>> indexedAttributes
)
     {
         this.indexedAttributes = indexedAttributes;
     }
 
 
-    public Set<Index<?,ServerEntry>> getIndexedAttributes()
+    public Set<JdbmIndex<?,ServerEntry>> getIndexedAttributes()
     {
         return indexedAttributes;
     }
@@ -186,11 +186,11 @@
         store.setSuffixDn( suffix );
         store.setWorkingDirectory( new File( directoryService.getWorkingDirectory().getPath()
+ File.separator + id ) );
 
-        Set<Index<?,ServerEntry>> userIndices = new HashSet<Index<?,ServerEntry>>();
+        Set<JdbmIndex<?,ServerEntry>> userIndices = new HashSet<JdbmIndex<?,ServerEntry>>();
         
-        for ( Index<?,ServerEntry> obj : indexedAttributes )
+        for ( JdbmIndex<?,ServerEntry> obj : indexedAttributes )
         {
-            Index<?,ServerEntry> index;
+            JdbmIndex<?,ServerEntry> index;
 
             if ( obj instanceof JdbmIndex )
             {

Modified: directory/apacheds/branches/ldif-partition/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
(original)
+++ directory/apacheds/branches/ldif-partition/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
Fri Apr  3 14:40:57 2009
@@ -23,7 +23,6 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.impl.DefaultDirectoryService;
-import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.schema.SerializableComparator;
@@ -136,7 +135,7 @@
         schemaPartition.setId( "schema" );
         schemaPartition.setCacheSize( 1000 );
 
-        Set<Index<?, ServerEntry>> indexedAttributes = new HashSet<Index<?,
ServerEntry>>();
+        Set<JdbmIndex<?, ServerEntry>> indexedAttributes = new HashSet<JdbmIndex<?,
ServerEntry>>();
         for ( String attributeId : extractor.getDbFileListing().getIndexedAttributes() )
         {
             indexedAttributes.add( new JdbmIndex<String,ServerEntry>( attributeId )
);

Modified: directory/apacheds/branches/ldif-partition/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
(original)
+++ directory/apacheds/branches/ldif-partition/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
Fri Apr  3 14:40:57 2009
@@ -614,12 +614,12 @@
             return oid;
         }
 
-        public List getNameSet( String oid ) throws NamingException
+        public List<String> getNameSet( String oid ) throws NamingException
         {
             return Collections.singletonList( oid );
         }
 
-        public Iterator list()
+        public Iterator<?> list()
         {
             return Collections.EMPTY_LIST.iterator();
         }
@@ -628,12 +628,12 @@
         {
         }
 
-        public Map getOidByName()
+        public Map<String,String> getOidByName()
         {
             return null;
         }
 
-        public Map getNameByOid()
+        public Map<String,String> getNameByOid()
         {
             return null;
         }

Modified: directory/apacheds/branches/ldif-partition/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
(original)
+++ directory/apacheds/branches/ldif-partition/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Fri Apr  3 14:40:57 2009
@@ -525,14 +525,14 @@
         LOG.warn( "Supplied index {} is not a JdbmIndex.  " +
             "Will create new JdbmIndex using copied configuration parameters.", index );
         JdbmIndex<K,E> jdbmIndex = new JdbmIndex<K, E>( index.getAttributeId()
);
-        jdbmIndex.setCacheSize( index.getCacheSize() );
+        jdbmIndex.setCacheSize( 10 );
         jdbmIndex.setNumDupLimit( JdbmIndex.DEFAULT_DUPLICATE_LIMIT );
-        jdbmIndex.setWkDirPath( index.getWkDirPath() );
+        jdbmIndex.setWkDirPath( this.getWorkingDirectory() );
         return jdbmIndex;
     }
 
 
-    public void setUserIndices( Set<Index<?,E>> userIndices )
+    public void setUserIndices( Set<? extends Index<?,E>> userIndices )
     {
         protect( "userIndices" );
         for ( Index<?,E> index : userIndices )

Modified: directory/apacheds/branches/ldif-partition/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
(original)
+++ directory/apacheds/branches/ldif-partition/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
Fri Apr  3 14:40:57 2009
@@ -55,7 +55,7 @@
 {
     AttributeTypeRegistry registry;
     File dbFileDir;
-    Index<String,ServerEntry> idx;
+    JdbmIndex<String,ServerEntry> idx;
 
 
     @Before

Modified: directory/apacheds/branches/ldif-partition/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
(original)
+++ directory/apacheds/branches/ldif-partition/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
Fri Apr  3 14:40:57 2009
@@ -95,6 +95,7 @@
      * @throws SamException thrown when there is a failure within the verifier
      * or a verifier cannot be found.
      */
+    @SuppressWarnings("unchecked")
     public KerberosKey verify( PrincipalStoreEntry entry, byte[] sad ) throws SamException
     {
         SamVerifier verifier = null;
@@ -140,9 +141,9 @@
 
         try
         {
-            Class c = Class.forName( fqcn );
+            Class<? extends SamVerifier> c = ( Class<? extends SamVerifier> )
Class.forName( fqcn );
 
-            verifier = ( SamVerifier ) c.newInstance();
+            verifier = c.newInstance();
 
             try
             {

Modified: directory/apacheds/branches/ldif-partition/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
(original)
+++ directory/apacheds/branches/ldif-partition/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
Fri Apr  3 14:40:57 2009
@@ -25,7 +25,6 @@
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.kerberos.KeyDerivationInterceptor;
 import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
@@ -161,7 +160,7 @@
         partition.setId( "example" );
         partition.setSuffix( "dc=example,dc=com" );
 
-        Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
+        Set<JdbmIndex<?,ServerEntry>> indexedAttrs = new HashSet<JdbmIndex<?,ServerEntry>>();
         indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "ou" ) );
         indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "dc" ) );
         indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "objectClass" ) );

Modified: directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
(original)
+++ directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
Fri Apr  3 14:40:57 2009
@@ -31,7 +31,6 @@
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.kerberos.KeyDerivationInterceptor;
 import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.integ.LdapServerFactory;
@@ -123,7 +122,7 @@
              partition.setId( "example" );
              partition.setSuffix( "dc=example,dc=com" );
 
-             Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
+             Set<JdbmIndex<?,ServerEntry>> indexedAttrs = new HashSet<JdbmIndex<?,ServerEntry>>();
              indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "ou" ) );
              indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "dc" ) );
              indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "objectClass" ) );

Modified: directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java
(original)
+++ directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java
Fri Apr  3 14:40:57 2009
@@ -31,7 +31,6 @@
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.kerberos.PasswordPolicyInterceptor;
 import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.integ.LdapServerFactory;
@@ -112,7 +111,7 @@
             partition.setId( "example" );
             partition.setSuffix( "dc=example,dc=com" );
 
-            Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
+            Set<JdbmIndex<?,ServerEntry>> indexedAttrs = new HashSet<JdbmIndex<?,ServerEntry>>();
             indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "ou" ) );
             indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "dc" ) );
             indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "objectClass" ) );

Modified: directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
(original)
+++ directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
Fri Apr  3 14:40:57 2009
@@ -60,7 +60,6 @@
 import org.apache.directory.server.ldap.handlers.bind.plain.PlainMechanismHandler;
 import org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler;
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
-import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
 import org.apache.directory.shared.ldap.message.BindRequestImpl;
 import org.apache.directory.shared.ldap.message.BindResponse;
@@ -137,7 +136,7 @@
              partition.setId( "example" );
              partition.setSuffix( "dc=example,dc=com" );
 
-             Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
+             Set<JdbmIndex<?,ServerEntry>> indexedAttrs = new HashSet<JdbmIndex<?,ServerEntry>>();
              indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "ou" ) );
              indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "dc" ) );
              indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "objectClass" ) );

Modified: directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java
(original)
+++ directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java
Fri Apr  3 14:40:57 2009
@@ -59,7 +59,6 @@
 import org.apache.directory.server.ldap.handlers.extended.StartTlsHandler;
 import org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler;
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
-import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
 import org.apache.mina.util.AvailablePortFinder;
@@ -123,7 +122,7 @@
             system.setSuffix( "ou=system" );
 
             // Add indexed attributes for system partition
-            Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
+            Set<JdbmIndex<?,ServerEntry>> indexedAttrs = new HashSet<JdbmIndex<?,ServerEntry>>();
             indexedAttrs.add( new JdbmIndex<String,ServerEntry>( SchemaConstants.OBJECT_CLASS_AT
) );
             indexedAttrs.add( new JdbmIndex<String,ServerEntry>( SchemaConstants.OU_AT
) );
             system.setIndexedAttributes( indexedAttrs );

Modified: directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/search/IndexedNegationSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/search/IndexedNegationSearchIT.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/search/IndexedNegationSearchIT.java
(original)
+++ directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/search/IndexedNegationSearchIT.java
Fri Apr  3 14:40:57 2009
@@ -28,7 +28,6 @@
 import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
 import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.server.core.integ.annotations.Factory;
-import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.integ.LdapServerFactory;
@@ -170,7 +169,7 @@
             system.setSuffix( "ou=system" );
 
             // Add indexed attributes for system partition
-            Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
+            Set<JdbmIndex<?,ServerEntry>> indexedAttrs = new HashSet<JdbmIndex<?,ServerEntry>>();
             indexedAttrs.add( new JdbmIndex<String,ServerEntry>( SchemaConstants.OBJECT_CLASS_AT
) );
             indexedAttrs.add( new JdbmIndex<String,ServerEntry>( SchemaConstants.OU_AT
) );
             system.setIndexedAttributes( indexedAttrs );

Modified: directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
(original)
+++ directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
Fri Apr  3 14:40:57 2009
@@ -62,7 +62,6 @@
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
-import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.Tuple;
 import org.apache.directory.shared.ldap.MultiException;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
@@ -158,7 +157,7 @@
                 ResultCodeEnum.OTHER );
         }
 
-        Set<Index<?,ServerEntry>> indexedAttributes = new HashSet<Index<?,ServerEntry>>();
+        Set<JdbmIndex<?,ServerEntry>> indexedAttributes = new HashSet<JdbmIndex<?,ServerEntry>>();
 
         for ( String attributeId : listing.getIndexedAttributes() )
         {

Modified: directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java
(original)
+++ directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java
Fri Apr  3 14:40:57 2009
@@ -57,7 +57,6 @@
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
-import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.Tuple;
 import org.apache.directory.shared.ldap.MultiException;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
@@ -148,7 +147,7 @@
                 ResultCodeEnum.OTHER );
         }
 
-        Set<Index<?,ServerEntry>> indexedAttributes = new HashSet<Index<?,ServerEntry>>();
+        Set<JdbmIndex<?,ServerEntry>> indexedAttributes = new HashSet<JdbmIndex<?,ServerEntry>>();
 
         for ( String attributeId : listing.getIndexedAttributes() )
         {

Modified: directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Index.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Index.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Index.java
(original)
+++ directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Index.java
Fri Apr  3 14:40:57 2009
@@ -20,8 +20,6 @@
 package org.apache.directory.server.xdbm;
 
 
-import java.io.File;
-
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.server.core.cursor.Cursor;
 
@@ -63,40 +61,6 @@
 
 
     /**
-     * Gets the size of the index cache in terms of the number of index entries to be cached.
-     *
-     * @return the size of the index cache
-     */
-    int getCacheSize();
-
-
-    /**
-     * Sets the size of the index cache in terms of the number of index entries to be cached.
-     *
-     * @param cacheSize the size of the index cache
-     */
-    void setCacheSize( int cacheSize );
-
-
-    /**
-     * Sets the working directory path to something other than the default. Sometimes more
-     * performance is gained by locating indices on separate disk spindles.
-     *
-     * @param wkDirPath optional working directory path
-     */
-    void setWkDirPath( File wkDirPath );
-
-
-    /**
-     * Gets the working directory path to something other than the default. Sometimes more
-     * performance is gained by locating indices on separate disk spindles.
-     *
-     * @return optional working directory path
-     */
-    File getWkDirPath();
-
-
-    /**
      * Checks whether or not calls to count the number of keys greater than or
      * less than the key are exact.
      *

Added: directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/NoNormalizerOnIndexException.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/NoNormalizerOnIndexException.java?rev=761697&view=auto
==============================================================================
--- directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/NoNormalizerOnIndexException.java
(added)
+++ directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/NoNormalizerOnIndexException.java
Fri Apr  3 14:40:57 2009
@@ -0,0 +1,37 @@
+/*
+ *   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.
+ *
+ */
+
+package org.apache.directory.server.xdbm;
+
+/**
+ * TODO NoNormalizerOnIndexException.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NoNormalizerOnIndexException extends Exception
+{
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
+}

Modified: directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java
(original)
+++ directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java
Fri Apr  3 14:40:57 2009
@@ -97,10 +97,10 @@
     File getWorkingDirectory();
 
 
-    void setUserIndices( Set<Index<?,E>> userIndices );
+    void setUserIndices( Set<? extends Index<?,E>> userIndices );
 
 
-    Set<Index<?,E>> getUserIndices();
+    Set<? extends Index<?,E>> getUserIndices();
 
 
     void setSuffixDn( String suffixDn );

Modified: directory/apacheds/branches/ldif-partition/xdbm-base/src/test/java/org/apache/directory/server/xdbm/XdbmFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/xdbm-base/src/test/java/org/apache/directory/server/xdbm/XdbmFactory.java?rev=761697&r1=761696&r2=761697&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/xdbm-base/src/test/java/org/apache/directory/server/xdbm/XdbmFactory.java
(original)
+++ directory/apacheds/branches/ldif-partition/xdbm-base/src/test/java/org/apache/directory/server/xdbm/XdbmFactory.java
Fri Apr  3 14:40:57 2009
@@ -20,6 +20,10 @@
 package org.apache.directory.server.xdbm;
 
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
 /**
  * Factory interface used by attached tests to instantiate various Xdbm 
  * component implementations. Xdbm implementation modules would implement
@@ -37,28 +41,56 @@
  * @version $Rev$, $Date$
  */
 @SuppressWarnings("unchecked")
-public abstract class XdbmFactory
+public abstract class XdbmFactory<K,V>
 {
+    private static final Logger LOG = LoggerFactory.getLogger( XdbmFactory.class.getSimpleName()
);
+
+    
+    /**
+     * Get's an instance of XdbmFactory using a system property to find the
+     * implementation specific class.
+     *
+     * @return implementation specific factory or null if one cannot be found
+     * @throws Exception if failures occur during factory instantiation
+     */
     public static XdbmFactory instance() throws Exception
     {
         String className = System.getProperty( "xdbmFactory" );
         if ( className == null )
         {
-            throw new RuntimeException( "xdbmFactory does not exist in the system properties."
);
+            LOG.error( "xdbmFactory does not exist in the system properties. " 
+                + "Null factory instance being returned. ");
         }
         Class clazz = Class.forName( className );
         return ( XdbmFactory ) clazz.newInstance();
     }
     
-    public abstract Table createTable();
-    public abstract void destroy( Table table );
     
-    public abstract Index createIndex();
-    public abstract void destroy( Index index );
+    /**
+     * Creates a new implementation specific Table instance and initializes it
+     * for immediate use.
+     *
+     * @return a Table implementation
+     * @throws Exception on implementation specific issues on Table creation
+     */
+    public abstract Table<K,V> createTable() throws Exception;
+    
+    
+    /**
+     * Destroy an implementation specific Table instance removing any 
+     * resources it may have taken.
+     *
+     * @param table a Table implementation
+     * @throws Exception on implementation specific issues on Table destruction
+     */
+    public abstract void destroy( Table<K,V> table ) throws Exception;
+    
+    public abstract Index createIndex() throws Exception;
+    public abstract void destroy( Index index ) throws Exception;
     
-    public abstract MasterTable createMasterTable();
-    public abstract void destroy( MasterTable masterTable );
+    public abstract MasterTable createMasterTable() throws Exception;
+    public abstract void destroy( MasterTable masterTable ) throws Exception;
     
-    public abstract Store createStore();
-    public abstract void destroy( Store store );
+    public abstract Store createStore() throws Exception;
+    public abstract void destroy( Store store ) throws Exception;
 }



Mime
View raw message