org.apache.lucene.benchmark.byTask.tasks
Class ReadTask

java.lang.Object
  extended byorg.apache.lucene.benchmark.byTask.tasks.PerfTask
      extended byorg.apache.lucene.benchmark.byTask.tasks.ReadTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
SearchTask, SearchTravRetTask, SearchTravTask, WarmTask

public abstract class ReadTask
extends PerfTask

Read index (abstract) task. Sub classes implement withSearch(), withWarm(), withTraverse() and withRetrieve() methods to configure the actual action. Other side effects: none.


Field Summary
 
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
NEW_LINE, params
 
Constructor Summary
ReadTask(PerfRunData runData)
           
 
Method Summary
 int doLogic()
          Perform the task once (ignoring repetions specification) Return number of work items done by this task.
abstract  QueryMaker getQueryMaker()
          Return query maker used for this task.
abstract  boolean withRetrieve()
          Return true if, with search & results traversing, docs should be retrieved.
abstract  boolean withSearch()
          Return true if search should be performed.
abstract  boolean withTraverse()
          Return true if, with search, results should be traversed.
abstract  boolean withWarm()
          Return true if warming should be performed.
 
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, getDepth, getName, getParams, getRunData, runAndMaybeStats, setDepth, setName, setParams, setup, shouldNeverLogAtStart, shouldNotRecordStats, tearDown, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReadTask

public ReadTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

getQueryMaker

public abstract QueryMaker getQueryMaker()
Return query maker used for this task.


withSearch

public abstract boolean withSearch()
Return true if search should be performed.


withWarm

public abstract boolean withWarm()
Return true if warming should be performed.


withTraverse

public abstract boolean withTraverse()
Return true if, with search, results should be traversed.


withRetrieve

public abstract boolean withRetrieve()
Return true if, with search & results traversing, docs should be retrieved.



Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.