Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0D7810AAD for ; Sun, 16 Mar 2014 09:20:27 +0000 (UTC) Received: (qmail 60406 invoked by uid 500); 16 Mar 2014 09:20:26 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 60323 invoked by uid 500); 16 Mar 2014 09:20:25 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 60316 invoked by uid 99); 16 Mar 2014 09:20:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Mar 2014 09:20:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Mar 2014 09:20:21 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 92A5723889E3; Sun, 16 Mar 2014 09:19:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1578010 - in /directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot: MavibotDnIndex.java MavibotIndex.java MavibotMasterTable.java MavibotRdnIndex.java Date: Sun, 16 Mar 2014 09:19:59 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140316091959.92A5723889E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Sun Mar 16 09:19:58 2014 New Revision: 1578010 URL: http://svn.apache.org/r1578010 Log: Used the static serializers instead of creating a new instance everytime Modified: directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotDnIndex.java directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndex.java directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotMasterTable.java directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndex.java Modified: directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotDnIndex.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotDnIndex.java?rev=1578010&r1=1578009&r2=1578010&view=diff ============================================================================== --- directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotDnIndex.java (original) +++ directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotDnIndex.java Sun Mar 16 09:19:58 2014 @@ -106,10 +106,10 @@ public class MavibotDnIndex extends Mavi String forwardTableName = attributeType.getOid() + FORWARD_BTREE; forward = new MavibotTable( recordMan, schemaManager, forwardTableName, dnSerializer, - new StringSerializer(), true ); + StringSerializer.INSTANCE, true ); String reverseTableName = attributeType.getOid() + REVERSE_BTREE; - reverse = new MavibotTable( recordMan, schemaManager, reverseTableName, new StringSerializer(), + reverse = new MavibotTable( recordMan, schemaManager, reverseTableName, StringSerializer.INSTANCE, dnSerializer, !attributeType.isSingleValued() ); String path = new File( this.wkDirPath, attributeType.getOid() ).getAbsolutePath(); Modified: directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndex.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndex.java?rev=1578010&r1=1578009&r2=1578010&view=diff ============================================================================== --- directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndex.java (original) +++ directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndex.java Sun Mar 16 09:19:58 2014 @@ -6,16 +6,16 @@ * 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.core.partition.impl.btree.mavibot; @@ -102,7 +102,7 @@ public class MavibotIndex extends Abs /** * Initialize the index for an Attribute, with a specific working directory (may be null). - * + * * @param schemaManager The schemaManager to use to get back the Attribute * @param attributeType The attributeType this index is created for * @throws IOException If the initialization failed @@ -147,7 +147,7 @@ public class MavibotIndex extends Abs /** * Initializes the forward and reverse tables used by this Index. - * + * * @param schemaManager The server schemaManager * @throws IOException if we cannot initialize the forward and reverse * tables @@ -192,7 +192,7 @@ public class MavibotIndex extends Abs String forwardTableName = attributeType.getOid() + FORWARD_BTREE; forward = new MavibotTable( recordMan, schemaManager, forwardTableName, forwardKeySerializer, - new StringSerializer(), forwardDups, AbstractBTreePartition.DEFAULT_CACHE_SIZE ); + StringSerializer.INSTANCE, forwardDups, AbstractBTreePartition.DEFAULT_CACHE_SIZE ); /* * Now the reverse map stores the primary key into the master table as @@ -203,7 +203,7 @@ public class MavibotIndex extends Abs if ( withReverse ) { String reverseTableName = attributeType.getOid() + REVERSE_BTREE; - reverse = new MavibotTable( recordMan, schemaManager, reverseTableName, new StringSerializer(), + reverse = new MavibotTable( recordMan, schemaManager, reverseTableName, StringSerializer.INSTANCE, forwardKeySerializer, !attributeType.isSingleValued() ); } @@ -218,7 +218,7 @@ public class MavibotIndex extends Abs /** * Sets the RecordManager - * + * * @param rm the RecordManager instance */ public void setRecordManager( RecordManager rm ) Modified: directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotMasterTable.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotMasterTable.java?rev=1578010&r1=1578009&r2=1578010&view=diff ============================================================================== --- directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotMasterTable.java (original) +++ directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotMasterTable.java Sun Mar 16 09:19:58 2014 @@ -6,16 +6,16 @@ * 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.core.partition.impl.btree.mavibot; @@ -40,13 +40,13 @@ public class MavibotMasterTable extends public MavibotMasterTable( RecordManager recordMan, SchemaManager schemaManager, String name, int cacheSize ) throws IOException { - super( recordMan, schemaManager, name, new StringSerializer(), new MavibotEntrySerializer(), false, cacheSize ); + super( recordMan, schemaManager, name, StringSerializer.INSTANCE, new MavibotEntrySerializer(), false, cacheSize ); } public MavibotMasterTable( RecordManager recordMan, SchemaManager schemaManager, String name ) throws IOException { - super( recordMan, schemaManager, name, new StringSerializer(), new MavibotEntrySerializer(), false ); + super( recordMan, schemaManager, name, StringSerializer.INSTANCE, new MavibotEntrySerializer(), false ); } Modified: directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndex.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndex.java?rev=1578010&r1=1578009&r2=1578010&view=diff ============================================================================== --- directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndex.java (original) +++ directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndex.java Sun Mar 16 09:19:58 2014 @@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory; /** * A special index which stores Rdn objects. - * + * * @author Apache Directory Project */ public class MavibotRdnIndex extends MavibotIndex @@ -99,7 +99,7 @@ public class MavibotRdnIndex extends Mav /** * Initializes the forward and reverse tables used by this Index. - * + * * @param schemaManager The server schemaManager * @throws IOException if we cannot initialize the forward and reverse * tables @@ -119,10 +119,10 @@ public class MavibotRdnIndex extends Mav String forwardTableName = attributeType.getOid() + FORWARD_BTREE; forward = new MavibotTable( recordMan, schemaManager, forwardTableName, - parentIdAndSerializer, new StringSerializer(), false ); + parentIdAndSerializer, StringSerializer.INSTANCE, false ); String reverseTableName = attributeType.getOid() + REVERSE_BTREE; reverse = new MavibotTable( recordMan, schemaManager, reverseTableName, - new StringSerializer(), parentIdAndSerializer, false ); + StringSerializer.INSTANCE, parentIdAndSerializer, false ); } }