Class NullThreadContext

    • Constructor Detail

      • NullThreadContext

        public NullThreadContext()
    • Method Detail

      • schedule

        public Scheduled schedule​(Duration delay,
                                  Runnable callback)
        Description copied from interface: Scheduler
        Schedules a runnable after a delay.
        Specified by:
        schedule in interface Scheduler
        Parameters:
        delay - the delay after which to run the callback
        callback - the callback to run
        Returns:
        the scheduled callback
      • schedule

        public Scheduled schedule​(Duration initialDelay,
                                  Duration interval,
                                  Runnable callback)
        Description copied from interface: Scheduler
        Schedules a runnable at a fixed rate.
        Specified by:
        schedule in interface Scheduler
        Parameters:
        initialDelay - the initial delay
        interval - the interval at which to run the callback
        callback - the callback to run
        Returns:
        the scheduled callback
      • isBlocked

        public boolean isBlocked()
        Description copied from interface: ThreadContext
        Returns whether the thread context is currently marked blocked.
        Specified by:
        isBlocked in interface ThreadContext
        Returns:
        whether the thread context is currently marked blocked
      • block

        public void block()
        Description copied from interface: ThreadContext
        Marks the thread context as blocked.
        Specified by:
        block in interface ThreadContext
      • unblock

        public void unblock()
        Description copied from interface: ThreadContext
        Marks the thread context as unblocked.
        Specified by:
        unblock in interface ThreadContext