Interface ISuspendable

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.ThreadLocal<ISuspendable> SUSPENDABLE
      The component suspendable for a component thread.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object getMonitor()
      Get the monitor for waiting.
      void resume​(Future<?> future)
      Resume the execution of the suspendable.
      void suspend​(Future<?> future, long timeout, boolean realtime)
      Suspend the execution of the suspendable.
    • Field Detail

      • SUSPENDABLE

        static final java.lang.ThreadLocal<ISuspendable> SUSPENDABLE
        The component suspendable for a component thread.
    • Method Detail

      • suspend

        void suspend​(Future<?> future,
                     long timeout,
                     boolean realtime)
        Suspend the execution of the suspendable.
        Parameters:
        future - The future to wait for.
        timeout - The timeout (-1 for no timeout, -2 for default timeout).
        realtime - Flag if timeout is realtime (in contrast to simulation time).
        Throws:
        TimeoutException - when not resumed before timeout.
      • resume

        void resume​(Future<?> future)
        Resume the execution of the suspendable.
        Parameters:
        future - The future that issues the resume.
      • getMonitor

        java.lang.Object getMonitor()
        Get the monitor for waiting.
        Returns:
        The monitor.