Class Priority


  • public class Priority
    extends Object
    A class that represents a priority for a unit of Work being managed by an instance of CommManager.
    • Field Detail

      • _priority

        protected int _priority
      • _lastPromotionTimestamp

        protected long _lastPromotionTimestamp
    • Constructor Detail

      • Priority

        public Priority​(Work work,
                        Priority.StartingPriority startingPriority)
        Constructs an instance of Priority

        Parameters:
        work - The instance of Work that this Priority instance represents the priority of.
        startingPriority - The priority to start the related work at.
    • Method Detail

      • getWork

        public Work getWork()
        Returns the instance of Work that this Priority instance represents the priority of.
      • getValue

        public int getValue()
        Returns the current priority value of this instance.
      • getCreatedTimestamp

        protected long getCreatedTimestamp()
        Returns the creation timestamp of this Priority instance in epoch milliseconds.
      • getLastPromotionTimestamp

        protected long getLastPromotionTimestamp()
        Returns the timestamp of the last priority promotion of this Priority instance in epoch milliseconds.