Class PriorityRunnable

java.lang.Object
org.kquiet.concurrent.PriorityRunnable
All Implemented Interfaces:
Runnable, Prioritized

public class PriorityRunnable extends Object implements Prioritized, Runnable
Prioritized Runnable. This class is for internal use.
Author:
Kimberly
  • Constructor Details

    • PriorityRunnable

      public PriorityRunnable(Runnable runnable, int priority)
      Create a prioritized Runnable.
      Parameters:
      runnable - wrapped Runnable
      priority - priority
  • Method Details

    • getPriority

      public int getPriority()
      Description copied from interface: Prioritized
      Get priority. Smaller value means higher priority.
      Specified by:
      getPriority in interface Prioritized
      Returns:
      priority
    • run

      public void run()
      Specified by:
      run in interface Runnable