public class DefaultDistributor extends Object implements SearchDistributor
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
log
Logger
|
Constructor and Description |
---|
DefaultDistributor() |
Modifier and Type | Method and Description |
---|---|
void |
distribute(List<Frontier> frontierList)
Distributes the list of the problems
|
SearchDistributor |
setDataConsumer(DataConsumer dataConsumer)
Sets the data consumer
|
void |
setFlag(String name,
AtomicBoolean flag)
TODO: Buggy !! this function is adding a new instance of AromicBoolen and
not setting the value of a current atomic boolean
|
DefaultDistributor |
setMaxNumberOfLines(long numberOfLines)
Sets the maximum number of lines to generate
|
DefaultDistributor |
setThreadCount(int threadCount)
Sets the number of threads to use
|
public DefaultDistributor setMaxNumberOfLines(long numberOfLines)
numberOfLines
- a long containing the maximum number of lines to
generatepublic DefaultDistributor setThreadCount(int threadCount)
threadCount
- an int containing the thread countpublic SearchDistributor setDataConsumer(DataConsumer dataConsumer)
SearchDistributor
setDataConsumer
in interface SearchDistributor
dataConsumer
- the DataConsumerpublic void distribute(List<Frontier> frontierList)
SearchDistributor
distribute
in interface SearchDistributor
frontierList
- a list containing the search problems to
distributepublic void setFlag(String name, AtomicBoolean flag)
SearchDistributor
setFlag
in interface SearchDistributor
name
- the name of the flagflag
- the value of the flagCopyright © 2014. All rights reserved.