org.apache.directory.server.core.partition.impl.btree
Class DefaultOptimizer

java.lang.Object
  extended by org.apache.directory.server.core.partition.impl.btree.DefaultOptimizer
All Implemented Interfaces:
Optimizer

public class DefaultOptimizer
extends java.lang.Object
implements Optimizer

Optimizer that annotates the filter using scan counts.

Version:
$Rev: 512197 $
Author:
Apache Directory Project

Constructor Summary
DefaultOptimizer(BTreePartition db)
          Creates an optimizer on a database.
 
Method Summary
 void annotate(org.apache.directory.shared.ldap.filter.ExprNode node)
          Annotates the expression tree to determine optimal evaluation order based on the scan count for indices that exist for each expression node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultOptimizer

public DefaultOptimizer(BTreePartition db)
Creates an optimizer on a database.

Parameters:
db - the database this optimizer works for.
Method Detail

annotate

public void annotate(org.apache.directory.shared.ldap.filter.ExprNode node)
              throws javax.naming.NamingException
Annotates the expression tree to determine optimal evaluation order based on the scan count for indices that exist for each expression node. If an index on the attribute does not exist an IndexNotFoundException will be thrown.

Specified by:
annotate in interface Optimizer
Parameters:
node - the root of the expression node tree
Throws:
javax.naming.NamingException - if there are failures while optimizing
See Also:
Optimizer.annotate(ExprNode)


Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.