directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1138848 - in /directory/apacheds/trunk: 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-partition/src/ma...
Date Thu, 23 Jun 2011 12:14:06 GMT
Author: elecharny
Date: Thu Jun 23 12:14:05 2011
New Revision: 1138848

URL: http://svn.apache.org/viewvc?rev=1138848&view=rev
Log:
Removed the isCountExact() method, as it's not use anywhere but in tests.

Modified:
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableWithDuplicatesTest.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/GenericIndex.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Index.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Table.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlRdnIndexTest.java

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
Thu Jun 23 12:14:05 2011
@@ -252,13 +252,6 @@ public class JdbmIndex<K, O> extends Abs
     // ------------------------------------------------------------------------
     // C O N F I G U R A T I O N   M E T H O D S
     // ------------------------------------------------------------------------
-
-    public boolean isCountExact()
-    {
-        return false;
-    }
-
-
     /**
      * Gets the threshold at which point duplicate keys use btree indirection to store
      * their values.

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
Thu Jun 23 12:14:05 2011
@@ -41,8 +41,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.SingletonCursor;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.comparators.SerializableComparator;
-import org.apache.directory.shared.util.SynchronizedLRUMap;
 import org.apache.directory.shared.util.StringConstants;
+import org.apache.directory.shared.util.SynchronizedLRUMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -305,12 +305,6 @@ public class JdbmTable<K,V> implements T
     }
 
 
-    public boolean isCountExact()
-    {
-        return false;
-    }
-        
-
     // ------------------------------------------------------------------------
     // Count Overloads
     // ------------------------------------------------------------------------

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
Thu Jun 23 12:14:05 2011
@@ -283,13 +283,6 @@ public class JdbmIndexTest
     }
 
 
-    @Test
-    public void testIsCountExact() throws Exception
-    {
-        assertFalse( new JdbmIndex<Object, Object>().isCountExact() );
-    }
-
-
     // -----------------------------------------------------------------------
     // Count Test Methods
     // -----------------------------------------------------------------------

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
Thu Jun 23 12:14:05 2011
@@ -21,7 +21,6 @@ package org.apache.directory.server.core
 
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
@@ -231,13 +230,6 @@ public class JdbmRdnIndexTest
     }
 
 
-    @Test
-    public void testIsCountExact() throws Exception
-    {
-        assertFalse( new JdbmRdnIndex<Object>().isCountExact() );
-    }
-
-
     // -----------------------------------------------------------------------
     // Count Test Methods
     // -----------------------------------------------------------------------

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java
Thu Jun 23 12:14:05 2011
@@ -222,16 +222,8 @@ public class JdbmTableNoDuplicatesTest
          * case guesses are allowed.
          */
         
-        if ( table.isCountExact() )
-        {
-            assertEquals( 5, table.lessThanCount( "5" ) );
-            assertEquals( 4, table.greaterThanCount( "5" ) );
-        }
-        else
-        {
-            assertEquals( 10, table.lessThanCount( "5" ) );
-            assertEquals( 10, table.greaterThanCount( "5" ) );
-        }
+        assertEquals( 10, table.lessThanCount( "5" ) );
+        assertEquals( 10, table.greaterThanCount( "5" ) );
     }
     
     

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableWithDuplicatesTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableWithDuplicatesTest.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableWithDuplicatesTest.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableWithDuplicatesTest.java
Thu Jun 23 12:14:05 2011
@@ -447,16 +447,8 @@ public class JdbmTableWithDuplicatesTest
          * case guesses are allowed.
          */
         
-        if ( table.isCountExact() )
-        {
-            assertEquals( 5, table.lessThanCount( "5" ) );
-            assertEquals( 9, table.greaterThanCount( "5" ) );
-        }
-        else
-        {
-            assertEquals( SIZE, table.lessThanCount( "5" ) );
-            assertEquals( SIZE, table.greaterThanCount( "5" ) );
-        }
+        assertEquals( SIZE, table.lessThanCount( "5" ) );
+        assertEquals( SIZE, table.greaterThanCount( "5" ) );
     }
     
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/GenericIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/GenericIndex.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/GenericIndex.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/GenericIndex.java
Thu Jun 23 12:14:05 2011
@@ -232,12 +232,6 @@ public class GenericIndex<K, O, ID> exte
     }
 
 
-    public boolean isCountExact()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-
     public int lessThanCount( K attrVal ) throws Exception
     {
         throw new UnsupportedOperationException();

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Index.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Index.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Index.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Index.java
Thu Jun 23 12:14:05 2011
@@ -100,20 +100,6 @@ public interface Index<K, O, ID>
     URI getWkDirPath();
 
 
-    /**
-     * Checks whether or not calls to count the number of keys greater than or
-     * less than the key are exact.
-     *
-     * Checking to see the number of values greater than or less than some key
-     * may be excessively costly.  Since this is not a critical function but
-     * one that assists in optimizing searches some implementations can just
-     * return a worst case (maximum) guess.
-     *
-     * @return true if the count is an exact value or a worst case guess
-     */
-    boolean isCountExact();
-
-
     // -----------------------------------------------------------------------
     // E N D   C O N F I G U R A T I O N   M E T H O D S
     // -----------------------------------------------------------------------

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Table.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Table.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Table.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Table.java
Thu Jun 23 12:14:05 2011
@@ -71,20 +71,6 @@ public interface Table<K, V>
     boolean isDupsEnabled();
 
 
-    /**
-     * Checks whether or not calls to count the number of keys greater than or
-     * less than the key are exact.
-     * 
-     * Checking to see the number of values greater than or less than some key
-     * may be excessively costly.  Since this is not a critical function but 
-     * one that assists in optimizing searches some implementations can just 
-     * return a worst case (maximum) guess.  
-     *
-     * @return true if the count is an exact value or a worst case guess 
-     */
-    boolean isCountExact();
-
-
     // ------------------------------------------------------------------------
     // Simple Table Key/Value Assertions 
     // ------------------------------------------------------------------------

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java
Thu Jun 23 12:14:05 2011
@@ -305,15 +305,6 @@ public class AvlIndex<K, O> extends Abst
     /**
      * {@inheritDoc}
      */
-    public boolean isCountExact()
-    {
-        return false;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public int lessThanCount( K attrVal ) throws Exception
     {
         return forward.lessThanCount( getNormalized( attrVal ) );

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java
Thu Jun 23 12:14:05 2011
@@ -286,15 +286,6 @@ public class AvlTable<K, V> implements T
     /**
      * {@inheritDoc}
      */
-    public boolean isCountExact()
-    {
-        return false;
-    }
-
-    
-    /**
-     * {@inheritDoc}
-     */
     public boolean isDupsEnabled()
     {
         return avl.isDupsAllowed();

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
Thu Jun 23 12:14:05 2011
@@ -295,13 +295,6 @@ public class GenericIndexTest
 
 
     @Test(expected = UnsupportedOperationException.class)
-    public void testIsCountExact()
-    {
-        index.isCountExact();
-    }
-
-
-    @Test(expected = UnsupportedOperationException.class)
     public void testLessThanCount() throws Exception
     {
         index.lessThanCount( "test" );

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlRdnIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlRdnIndexTest.java?rev=1138848&r1=1138847&r2=1138848&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlRdnIndexTest.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlRdnIndexTest.java
Thu Jun 23 12:14:05 2011
@@ -21,7 +21,6 @@ package org.apache.directory.server.xdbm
 
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.fail;
 
@@ -178,17 +177,9 @@ public class AvlRdnIndexTest
     }
 
 
-    @Test
-    public void testIsCountExact() throws Exception
-    {
-        assertFalse( new AvlRdnIndex().isCountExact() );
-    }
-
-
     // -----------------------------------------------------------------------
     // Count Test Methods
     // -----------------------------------------------------------------------
-
     @Test
     public void testCount() throws Exception
     {



Mime
View raw message