Interface ParallelLinearRetriever<TCase extends DataObject,TQuery extends Query>
- All Superinterfaces:
Retriever<DataObject,
Query>
- All Known Implementing Classes:
ParallelLinearRetrieverImpl
public interface ParallelLinearRetriever<TCase extends DataObject,TQuery extends Query>
extends Retriever<DataObject,Query>
Interface for a parallelized LinearRetriever.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default number of worker threads is the number of CPU coresstatic final boolean
Default value, if queue should be sorted before retrieval, is false.static final int
Default size for retrieval tasks is 1.Fields inherited from interface de.uni_trier.wi2.procake.retrieval.Retriever
DEFAULT_ADDQUERYTORESULTS
-
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
void
setNumberOfWorkers
(int numberOfWorkers) Set the number of parallel worker threads performing retrieval tasksvoid
setSorting
(boolean sorting) Determines whether queue should be sorted before retrieval or not.void
setTaskSize
(int taskSize) Sets the size of a single retrieval task.Methods inherited from interface de.uni_trier.wi2.procake.retrieval.Retriever
getValuator, isAddQueryToResults, newQuery, perform, setAddQueryToResults, setInternalSimilarityMeasure, setObjectPool, setSimilarityModel
-
Field Details
-
DEFAULT_SORTING
static final boolean DEFAULT_SORTINGDefault value, if queue should be sorted before retrieval, is false.- See Also:
-
DEFAULT_TASK_SIZE
static final int DEFAULT_TASK_SIZEDefault size for retrieval tasks is 1.- See Also:
-
DEFAULT_NUMBER_OF_WORKERS
static final int DEFAULT_NUMBER_OF_WORKERSDefault number of worker threads is the number of CPU cores
-
-
Method Details
-
setNumberOfWorkers
void setNumberOfWorkers(int numberOfWorkers) Set the number of parallel worker threads performing retrieval tasks- Parameters:
numberOfWorkers
- number of parallel retrieval tasks
-
getNumberOfWorkers
int getNumberOfWorkers()- Returns:
- number of workers
-
setTaskSize
void setTaskSize(int taskSize) Sets the size of a single retrieval task.- Parameters:
taskSize
- size of a single retrieval task
-
getTaskSize
int getTaskSize()- Returns:
- size of a single retrieval task
-
setSorting
void setSorting(boolean sorting) Determines whether queue should be sorted before retrieval or not.- Parameters:
sorting
- true, if queue should be sorted before retrieval
-
isSorting
boolean isSorting()- Returns:
- flag, if queue should be sorted before retrieval
-