Class PrioritizedRunnable

    • Method Summary

      Modifier and Type Method Description
      int compareTo​(PrioritizedRunnable pr)  
      long getAgeInMillis()
      The elapsed time in milliseconds since this instance was created, as calculated by the difference between System.nanoTime() at the time of creation, and System.nanoTime() at the time of invocation of this method
      long getCreationDateInNanos()  
      Priority priority()  
      static WrappedRunnable wrap​(java.lang.Runnable runnable, Priority priority)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Runnable

        run
    • Constructor Detail

      • PrioritizedRunnable

        protected PrioritizedRunnable​(Priority priority)
    • Method Detail

      • getCreationDateInNanos

        public long getCreationDateInNanos()
      • getAgeInMillis

        public long getAgeInMillis()
        The elapsed time in milliseconds since this instance was created, as calculated by the difference between System.nanoTime() at the time of creation, and System.nanoTime() at the time of invocation of this method
        Returns:
        the age in milliseconds calculated