Package net.toddm.comm
Class Priority
- java.lang.Object
-
- net.toddm.comm.Priority
-
public class Priority extends Object
A class that represents a priority for a unit ofWorkbeing managed by an instance ofCommManager.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPriority.StartingPriorityAn enumeration of priority levels that calling code can claim for theirWorkinstances
-
Field Summary
Fields Modifier and Type Field Description protected long_lastPromotionTimestampprotected int_priority
-
Constructor Summary
Constructors Constructor Description Priority(Work work, Priority.StartingPriority startingPriority)Constructs an instance ofPriority
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longgetCreatedTimestamp()Returns the creation timestamp of thisPriorityinstance in epoch milliseconds.protected longgetLastPromotionTimestamp()Returns the timestamp of the last priority promotion of thisPriorityinstance in epoch milliseconds.Priority.StartingPrioritygetStartingValue()Returns thePriority.StartingPrioritythat this instance started with.intgetValue()Returns the current priority value of this instance.WorkgetWork()
-
-
-
Constructor Detail
-
Priority
public Priority(Work work, Priority.StartingPriority startingPriority)
Constructs an instance ofPriority
-
-
Method Detail
-
getWork
public Work getWork()
-
getStartingValue
public Priority.StartingPriority getStartingValue()
Returns thePriority.StartingPrioritythat this instance started with.
-
getValue
public int getValue()
Returns the current priority value of this instance.
-
getCreatedTimestamp
protected long getCreatedTimestamp()
Returns the creation timestamp of thisPriorityinstance in epoch milliseconds.
-
getLastPromotionTimestamp
protected long getLastPromotionTimestamp()
Returns the timestamp of the last priority promotion of thisPriorityinstance in epoch milliseconds.
-
-