Package jadex.micro.mandelbrot.generate
Class GenerateService
java.lang.Object
jadex.micro.mandelbrot.generate.GenerateService
- All Implemented Interfaces:
IGenerateService
Generate service implementation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Handler for a single task allocation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jadex.core.IComponent
The agent.protected int
The current calculator count (for selecting the next).protected IFractalAlgorithm
protected IGenerateGui
protected int
The number of maximum retries for calculations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected jadex.future.IFuture
<Void> distributeWork
(AreaData data) Distribute the work to available or newly created calculation services.jadex.future.IFuture
<Void> generateArea
(AreaData data) Generate a specific area using a defined x and y size.protected jadex.future.IFuture
<ICalculateService> void
onStart()
jadex.future.Future
<AreaData> performTask
(AreaData task, GenerateService.AllocationData alda) jadex.future.IIntermediateFuture
<AreaData> performTasks
(Set<AreaData> tasks, boolean retry, Object user) Perform the given tasks using available or newly created services.
-
Field Details
-
agent
protected jadex.core.IComponent agentThe agent. -
ggui
-
curcalc
protected int curcalcThe current calculator count (for selecting the next). -
maxretries
protected int maxretriesThe number of maximum retries for calculations. -
defalgo
-
-
Constructor Details
-
GenerateService
public GenerateService()
-
-
Method Details
-
onStart
- Throws:
Exception
-
getTaskDistributor
-
generateArea
Generate a specific area using a defined x and y size.- Specified by:
generateArea
in interfaceIGenerateService
-
distributeWork
Distribute the work to available or newly created calculation services. -
performTasks
public jadex.future.IIntermediateFuture<AreaData> performTasks(Set<AreaData> tasks, boolean retry, Object user) Perform the given tasks using available or newly created services.- Parameters:
tasks
- The set of tasks to be performed.retry
- True, when failed tasks should be retried.user
- User data that is provided for service selection, creation, invocation (if any).- Returns:
- A future with intermediate and final results.
-
performTask
public jadex.future.Future<AreaData> performTask(AreaData task, GenerateService.AllocationData alda) -
getCalculateService
-