directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1513420 - in /directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree: BTree.java BTreeFactory.java DuplicateKeyMemoryHolder.java Leaf.java MultipleMemoryHolder.java RecordManager.java
Date Tue, 13 Aug 2013 10:12:03 GMT
Author: elecharny
Date: Tue Aug 13 10:12:03 2013
New Revision: 1513420

URL: http://svn.apache.org/r1513420
Log:
Renamed DuplicateKeyMemoryHolder to MultipleMemoryHolder

Added:
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/MultipleMemoryHolder.java
      - copied, changed from r1513407, directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/DuplicateKeyMemoryHolder.java
Removed:
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/DuplicateKeyMemoryHolder.java
Modified:
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTree.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeFactory.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/Leaf.java
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTree.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTree.java?rev=1513420&r1=1513419&r2=1513420&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTree.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTree.java
Tue Aug 13 10:12:03 2013
@@ -1634,7 +1634,7 @@ public class BTree<K, V>
         {
             if ( isAllowDuplicates() )
             {
-                return new DuplicateKeyMemoryHolder<K, V>( this, value );
+                return new MultipleMemoryHolder<K, V>( this, value );
             }
             else
             {
@@ -1646,7 +1646,7 @@ public class BTree<K, V>
         {
             if ( isAllowDuplicates() )
             {
-                return new DuplicateKeyMemoryHolder<K, V>( this, value );
+                return new MultipleMemoryHolder<K, V>( this, value );
             }
             else
             {

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeFactory.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeFactory.java?rev=1513420&r1=1513419&r2=1513420&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeFactory.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeFactory.java
Tue Aug 13 10:12:03 2013
@@ -163,6 +163,7 @@ public class BTreeFactory
         throws ClassNotFoundException, IllegalAccessException, InstantiationException
     {
         Class<?> keySerializer = Class.forName( keySerializerFqcn );
+        @SuppressWarnings("unchecked")
         ElementSerializer<K> instance = ( ElementSerializer<K> ) keySerializer.newInstance();
         btree.setKeySerializer( instance );
 
@@ -183,7 +184,9 @@ public class BTreeFactory
         throws ClassNotFoundException, IllegalAccessException, InstantiationException
     {
         Class<?> valueSerializer = Class.forName( valueSerializerFqcn );
-        btree.setValueSerializer( ( ElementSerializer<V> ) valueSerializer.newInstance()
);
+        @SuppressWarnings("unchecked")
+        ElementSerializer<V> instance = ( ElementSerializer<V> ) valueSerializer.newInstance();
+        btree.setValueSerializer( instance );
     }
 
 

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/Leaf.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/Leaf.java?rev=1513420&r1=1513419&r2=1513420&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/Leaf.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/Leaf.java
Tue Aug 13 10:12:03 2013
@@ -70,7 +70,7 @@ import org.apache.directory.mavibot.btre
 
         if ( btree.isAllowDuplicates() )
         {
-            this.values = ( DuplicateKeyMemoryHolder<K, V>[] ) Array.newInstance( DuplicateKeyMemoryHolder.class,
+            this.values = ( MultipleMemoryHolder<K, V>[] ) Array.newInstance( MultipleMemoryHolder.class,
                 nbElems );
         }
         else
@@ -779,7 +779,7 @@ import org.apache.directory.mavibot.btre
 
         if ( btree.isAllowDuplicates() )
         {
-            valueHolder = new DuplicateKeyMemoryHolder<K, V>( btree, value );
+            valueHolder = new MultipleMemoryHolder<K, V>( btree, value );
         }
         else
         {

Copied: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/MultipleMemoryHolder.java
(from r1513407, directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/DuplicateKeyMemoryHolder.java)
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/MultipleMemoryHolder.java?p2=directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/MultipleMemoryHolder.java&p1=directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/DuplicateKeyMemoryHolder.java&r1=1513407&r2=1513420&rev=1513420&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/DuplicateKeyMemoryHolder.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/MultipleMemoryHolder.java
Tue Aug 13 10:12:03 2013
@@ -36,7 +36,7 @@ import org.apache.directory.mavibot.btre
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DuplicateKeyMemoryHolder<K, V> implements ElementHolder<V, K, V>
+public class MultipleMemoryHolder<K, V> implements ElementHolder<V, K, V>
 {
     /** The BTree */
     private BTree<K, V> btree;
@@ -57,7 +57,7 @@ public class DuplicateKeyMemoryHolder<K,
      * @param offset The offset in disk for this value
      * @param value The value to store into a SoftReference
      */
-    public DuplicateKeyMemoryHolder( BTree<K, V> btree, V value )
+    public MultipleMemoryHolder( BTree<K, V> btree, V value )
     {
         this.btree = btree;
 
@@ -107,7 +107,7 @@ public class DuplicateKeyMemoryHolder<K,
      * @param valueContainer the BTree holding the values of a duplicate key
      *        present in the parent tree
      */
-    /* No qualifier */DuplicateKeyMemoryHolder( BTree<K, V> btree, BTree<V, V>
valueContainer )
+    MultipleMemoryHolder( BTree<K, V> btree, BTree<V, V> valueContainer )
     {
         this.btree = btree;
 

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java?rev=1513420&r1=1513419&r2=1513420&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
Tue Aug 13 10:12:03 2013
@@ -599,7 +599,7 @@ public class RecordManager
 
                     BTree<K, V> dupValueContainer = loadDupsBTree( value );
 
-                    valueHolder = new DuplicateKeyMemoryHolder( btree, dupValueContainer
);
+                    valueHolder = new MultipleMemoryHolder( btree, dupValueContainer );
                 }
                 else
                 {
@@ -1149,7 +1149,7 @@ public class RecordManager
                 {
                     if ( btree.isAllowDuplicates() )
                     {
-                        DuplicateKeyMemoryHolder<K, V> value = ( DuplicateKeyMemoryHolder<K,
V> ) ( ( Leaf<K, V> ) page )
+                        MultipleMemoryHolder<K, V> value = ( MultipleMemoryHolder<K,
V> ) ( ( Leaf<K, V> ) page )
                             .getValue( pos );
                         long duplicateContainerOffset = ( ( BTree<K, V> ) value.getValue(
btree ) ).getBtreeOffset();
                         buffer = LongSerializer.serialize( duplicateContainerOffset );



Mime
View raw message