Interface IExecutionFeature

All Known Implementing Classes:
ExecutionFeature

public interface IExecutionFeature
The execution feature controls how and when components execute their steps, e.g., single-threaded vs parallel steps, real-time vs. simulation time.
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Get the feature instance of the currently running component.
    jadex.core.IComponent
    Get the component to which this feature belongs.
    long
    Get the current time.
    static boolean
    Test if currently running inside a component.
    boolean
    Test if the current thread is used for current component execution.
    void
    scheduleStep(jadex.core.IThrowingConsumer<jadex.core.IComponent> step)
    Schedule a step that provides a result.
    <T> jadex.future.IFuture<T>
    scheduleStep(jadex.core.IThrowingFunction<jadex.core.IComponent,T> step)
    Schedule a step that provides a result.
    void
    Schedule a step to be run on the component.
    <T> jadex.future.IFuture<T>
    Schedule a step that provides a result.
    jadex.future.ITerminableFuture<Void>
    waitForDelay(long millis)
    Wait a specific amount.
  • Method Details

    • get

      static IExecutionFeature get()
      Get the feature instance of the currently running component.
    • isAnyComponentThread

      static boolean isAnyComponentThread()
      Test if currently running inside a component.
    • scheduleStep

      void scheduleStep(Runnable step)
      Schedule a step to be run on the component.
      Parameters:
      step - A step that is executed via the Runnable.run() method.
    • scheduleStep

      <T> jadex.future.IFuture<T> scheduleStep(Callable<T> step)
      Schedule a step that provides a result.
      Parameters:
      step - A step that is executed via the Supplier.get() method.
      Returns:
      A future that provides access to the step result, once it is available.
    • scheduleStep

      void scheduleStep(jadex.core.IThrowingConsumer<jadex.core.IComponent> step)
      Schedule a step that provides a result.
      Parameters:
      step - A step that is executed via the
      invalid reference
      IThrowingConsumer#accept()
      method.
    • scheduleStep

      <T> jadex.future.IFuture<T> scheduleStep(jadex.core.IThrowingFunction<jadex.core.IComponent,T> step)
      Schedule a step that provides a result.
      Parameters:
      step - A step that is executed via the
      invalid reference
      IThrowingFunction#apply()
      method.
      Returns:
      A future that provides access to the step result, once it is available.
    • isComponentThread

      boolean isComponentThread()
      Test if the current thread is used for current component execution.
      Returns:
      True, if it is the currently executing component thread.
    • waitForDelay

      jadex.future.ITerminableFuture<Void> waitForDelay(long millis)
      Wait a specific amount.
      Parameters:
      millis - The time to wait (in milliseconds).
      Returns:
      A future that is finished when the time has passed.
    • getComponent

      jadex.core.IComponent getComponent()
      Get the component to which this feature belongs.
    • getTime

      long getTime()
      Get the current time.
      Returns:
      The time in milliseconds.