directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 7007 - in incubator/directory/eve/trunk/eve/frontend/buffer/merlin-impl/src: java/org/apache/eve/buffer test/org/apache/eve/buffer
Date Fri, 05 Mar 2004 04:15:35 GMT
Author: akarasulu
Date: Thu Mar  4 20:15:34 2004
New Revision: 7007

Modified:
   incubator/directory/eve/trunk/eve/frontend/buffer/merlin-impl/src/java/org/apache/eve/buffer/MerlinBufferPool.xconfig
   incubator/directory/eve/trunk/eve/frontend/buffer/merlin-impl/src/test/org/apache/eve/buffer/MerlinBufferPoolTest.java
Log:
some refactoring going on here.


Modified: incubator/directory/eve/trunk/eve/frontend/buffer/merlin-impl/src/java/org/apache/eve/buffer/MerlinBufferPool.xconfig
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/buffer/merlin-impl/src/java/org/apache/eve/buffer/MerlinBufferPool.xconfig
(original)
+++ incubator/directory/eve/trunk/eve/frontend/buffer/merlin-impl/src/java/org/apache/eve/buffer/MerlinBufferPool.xconfig
Thu Mar  4 20:15:34 2004
@@ -3,7 +3,7 @@
 <configuration>
 	<name>default</name>
     <bufferSize>1024</bufferSize>
-    <maximum>10</maximum>
-    <initial>2</initial>
+    <maximum>100</maximum>
+    <initial>20</initial>
     <increment>4</increment>
 </configuration>

Modified: incubator/directory/eve/trunk/eve/frontend/buffer/merlin-impl/src/test/org/apache/eve/buffer/MerlinBufferPoolTest.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/buffer/merlin-impl/src/test/org/apache/eve/buffer/MerlinBufferPoolTest.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/buffer/merlin-impl/src/test/org/apache/eve/buffer/MerlinBufferPoolTest.java
Thu Mar  4 20:15:34 2004
@@ -194,17 +194,18 @@
             l_buffers[ii] = m_bp.getBuffer( this ) ;
             assertNotNull( "Got null ByteBuffer", l_buffers[ii] ) ;
             
-            if ( ii < 2 )
+            
+            if ( ii < m_bp.getConfig().getInitialSize() )
             {    
-                assertEquals( "size was off", 2, m_bp.size() ) ;
+                assertEquals( "size was off", m_bp.getConfig().getInitialSize(),
+                        m_bp.size() ) ;
             }
-            else if ( ii >= 2 && ii < 6 )
+            else if ( ii >= m_bp.getConfig().getInitialSize() && 
+                        ii < m_bp.getConfig().getMaximumSize() )
             {
-                assertEquals( "size was off", 6, m_bp.size() ) ;
-            }
-            else if ( ii >= 6 && ii < 10 )
-            {
-                assertEquals( "size was off", 10, m_bp.size() ) ;
+                int size = ( ii + m_bp.getConfig().getIncrement() ) / 4 ;
+                size *= 4 ;
+                assertEquals( "size was off", (int) size, m_bp.size() ) ;
             }
             else
             {

Mime
View raw message