Class GenerateService

java.lang.Object
jadex.micro.mandelbrot.generate.GenerateService
All Implemented Interfaces:
IGenerateService

public class GenerateService extends Object implements IGenerateService
Generate service implementation.
  • Field Details

    • agent

      protected jadex.core.IComponent agent
      The agent.
    • ggui

      protected IGenerateGui ggui
    • curcalc

      protected int curcalc
      The current calculator count (for selecting the next).
    • maxretries

      protected int maxretries
      The number of maximum retries for calculations.
    • defalgo

      protected IFractalAlgorithm defalgo
  • Constructor Details

    • GenerateService

      public GenerateService()
  • Method Details

    • onStart

      public void onStart() throws Exception
      Throws:
      Exception
    • getTaskDistributor

      public IIntermediateTaskDistributor<PartDataChunk,AreaData> getTaskDistributor()
    • generateArea

      public jadex.future.IFuture<Void> generateArea(AreaData data)
      Generate a specific area using a defined x and y size.
      Specified by:
      generateArea in interface IGenerateService
    • distributeWork

      protected jadex.future.IFuture<Void> distributeWork(AreaData data)
      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

      protected jadex.future.IFuture<ICalculateService> getCalculateService()