Class Master<T extends ParallelTask<?>,R>
java.lang.Object
org.uma.jmetal.parallel.asynchronous.multithreaded.Master<T,R>
- All Implemented Interfaces:
AsynchronousParallelAlgorithm<T,R>
- Direct Known Subclasses:
AsynchronousMultiThreadedGeneticAlgorithm
public abstract class Master<T extends ParallelTask<?>,R>
extends Object
implements AsynchronousParallelAlgorithm<T,R>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BlockingQueue<T> protected intprotected BlockingQueue<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TgetInitialTask(List<T> initialTasks) abstract voidprocessComputedTask(T task) abstract booleanvoidsubmitInitialTasks(List<T> initialTasks) voidsubmitTask(T task) booleanthereAreInitialTasksPending(List<T> initialTasks) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.uma.jmetal.parallel.asynchronous.algorithm.AsynchronousParallelAlgorithm
createInitialTasks, getResult, initProgress, run, updateProgress
-
Field Details
-
numberOfCores
protected int numberOfCores -
completedTaskQueue
-
pendingTaskQueue
-
-
Constructor Details
-
Master
public Master(int numberOfCores)
-
-
Method Details
-
submitInitialTasks
- Specified by:
submitInitialTasksin interfaceAsynchronousParallelAlgorithm<T extends ParallelTask<?>,R>
-
waitForComputedTask
- Specified by:
waitForComputedTaskin interfaceAsynchronousParallelAlgorithm<T extends ParallelTask<?>,R>
-
processComputedTask
- Specified by:
processComputedTaskin interfaceAsynchronousParallelAlgorithm<T extends ParallelTask<?>,R>
-
submitTask
- Specified by:
submitTaskin interfaceAsynchronousParallelAlgorithm<T extends ParallelTask<?>,R>
-
createNewTask
- Specified by:
createNewTaskin interfaceAsynchronousParallelAlgorithm<T extends ParallelTask<?>,R>
-
thereAreInitialTasksPending
- Specified by:
thereAreInitialTasksPendingin interfaceAsynchronousParallelAlgorithm<T extends ParallelTask<?>,R>
-
getInitialTask
- Specified by:
getInitialTaskin interfaceAsynchronousParallelAlgorithm<T extends ParallelTask<?>,R>
-
stoppingConditionIsNotMet
public abstract boolean stoppingConditionIsNotMet()- Specified by:
stoppingConditionIsNotMetin interfaceAsynchronousParallelAlgorithm<T extends ParallelTask<?>,R>
-
getCompletedTaskQueue
-
getPendingTaskQueue
-