org.objectweb.medor.eval.lib

Class MedorEvaluator

Implemented Interfaces:
QueryEvaluator

public class MedorEvaluator
extends java.lang.Object
implements QueryEvaluator

This class is a simple evaluator of query tree, supporting the data prefetching

Author:
S.Chassande-Barrioz

Constructor Summary

MedorEvaluator(QueryTree query, long cacheSize)

Method Summary

TupleCollection
evaluate(ParameterOperand[] parameters, ConnectionResources resources, Map evaluationMDMap)
First, it allocates a tree of Evaluator (Wrapper or NodeEvaluator) for the query tree associated to this evaluator.
TupleCollection
evaluate(ParameterOperand[] parameters, ConnectionResources resources, PrefetchBuffer prefetchBuffer, Map evalMDMap)
long
getCacheSize()
QueryTree
getQueryTree()
ConnectionResources
getRequiredConnectionResources()
WrapperFactory
getWrapperFactory()

Constructor Details

MedorEvaluator

public MedorEvaluator(QueryTree query,
                      long cacheSize)
            throws EvaluationException

Method Details

evaluate

public TupleCollection evaluate(ParameterOperand[] parameters,
                                ConnectionResources resources,
                                Map evaluationMDMap)
            throws EvaluationException
First, it allocates a tree of Evaluator (Wrapper or NodeEvaluator) for the query tree associated to this evaluator. In a second step it launches the evalution of the query.
Specified by:
evaluate in interface QueryEvaluator

Parameters:
parameters - is the array of parameters
resources - is the holder of connection used by the wrapper to access the data support.


evaluate

public TupleCollection evaluate(ParameterOperand[] parameters,
                                ConnectionResources resources,
                                PrefetchBuffer prefetchBuffer,
                                Map evalMDMap)
            throws EvaluationException
Specified by:
evaluate in interface QueryEvaluator

Parameters:
parameters - is a ConnectionResources containing associations between the DataStore names used in the QueryTree and the connection objects to use for the evaluation.
prefetchBuffer - is the prefetchBuffer instance where buffer data must be put. If this field is null, then no data prefetching mus be done.


getCacheSize

public long getCacheSize()
Specified by:
getCacheSize in interface QueryEvaluator


getQueryTree

public QueryTree getQueryTree()
Specified by:
getQueryTree in interface QueryEvaluator


getRequiredConnectionResources

public ConnectionResources getRequiredConnectionResources()
Specified by:
getRequiredConnectionResources in interface QueryEvaluator


getWrapperFactory

public WrapperFactory getWrapperFactory()
Specified by:
getWrapperFactory in interface QueryEvaluator