static int compare ( final Date nextFireTime1 , final int priority1 , final TriggerKey key1 , final Date nextFireTime2 , final int priority2 , final TriggerKey key2 ) { if ( nextFireTime1 != null || nextFireTime2 != null ) { if ( nextFireTime1 == null ) return 1 ; if ( nextFireTime2 == null ) return - 1 ; if ( nextFireTime1 . before ( nextFireTime2 ) ) return - 1 ; if ( nextFireTime1 . after ( nextFireTime2 ) ) return 1 ; } int comp = priority2 - priority1 ; if ( comp == 0 ) comp = key1 . compareTo ( key2 ) ; return comp ; }
This static method exists for comparator in TC clustered quartz