public Queue < SessionSchedulable > getPreemptQueue ( ) { if ( preemptQueue == null ) { ScheduleComparator comparator = null ; switch ( configManager . getPoolComparator ( poolInfo ) ) { case FIFO : comparator = ScheduleComparator . FIFO_PREEMPT ; break ; case FAIR : comparator = ScheduleComparator . FAIR_PREEMPT ; break ; case DEADLINE : comparator = ScheduleComparator . DEADLINE_PREEMPT ; break ; default : throw new IllegalArgumentException ( "Unknown comparator" ) ; } preemptQueue = createSessionQueue ( comparator ) ; } return preemptQueue ; }
Get the queue of sessions sorted for preemption