Package uk.ac.ebi.utils.threading
Class BatchServiceTask.TaskComparator
java.lang.Object
uk.ac.ebi.utils.threading.BatchServiceTask.TaskComparator
- All Implemented Interfaces:
Comparator<Runnable>
- Enclosing class:
BatchServiceTask
Provides a task comparison based on
BatchServiceTask.getPriority() (higher priorities comes first). This
is useful when you override BatchService.newThreadPoolExecutor(int) to return an executor service that
uses PriorityBlockingQueue.- Author:
- brandizi
- Date:
- 28 Jan 2016
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
TaskComparator
public TaskComparator()
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<Runnable>
-