Class SchedulerLocal<T>


  • public class SchedulerLocal<T>
    extends java.lang.Object
    Associates a value with the current FiberScheduler
    • Constructor Summary

      Constructors 
      Constructor Description
      SchedulerLocal()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T get()
      Returns the scheduler-local value of this SchedulerLocal.
      protected T initialValue​(FiberScheduler scheduler)
      Computes the initial value for the current FiberScheduler.
      void remove()
      Removes the association between the scheduler-local value and the current scheduler.
      void set​(T value)
      Sets the scheduler-local value of this SchedulerLocal.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SchedulerLocal

        public SchedulerLocal()
    • Method Detail

      • initialValue

        protected T initialValue​(FiberScheduler scheduler)
        Computes the initial value for the current FiberScheduler. Returns null by default;
        Parameters:
        scheduler - the current FiberScheduler
        Returns:
        the initial value
      • set

        public final void set​(T value)
        Sets the scheduler-local value of this SchedulerLocal.
      • remove

        public final void remove()
        Removes the association between the scheduler-local value and the current scheduler. The next call to get() would return the initial value returned by a fresh call to initialValue.