Interface IExecutionService


  • public interface IExecutionService
    Common interface for different execution services. An executor service is responsible for executing for IExecutables. todo: make available the state of the executor service. It should be possible to stop the service. Get its state transfer it to some other executor and start the other one. Therefore suspend should either come back when service really is suspended or execution status should be readable. State representation? = all executables and their state? todo: use callbacks?
    • Method Detail

      • execute

        void execute​(IExecutable task)
        Execute a task. Triggers the task to be executed in future.
        Parameters:
        task - The task to execute.
      • cancel

        IFuture<java.lang.Void> cancel​(IExecutable task)
        Cancel a task. Triggers the task to be not executed in future.
        Parameters:
        task - The task to execute.
        Returns:
        Future signaling cancellation.
      • getRunningTasks

        IExecutable[] getRunningTasks()
        Get the currently running or waiting tasks.
      • getNextIdleFuture

        IFuture<java.lang.Void> getNextIdleFuture()
        Get the future indicating that executor is idle.