Package org.mycore.util.concurrent
Class MCRRunnableComperator
java.lang.Object
org.mycore.util.concurrent.MCRRunnableComperator
- All Implemented Interfaces:
Comparator<Runnable>
A
CompletableFuture
encapsulates a Supplier
with an AsyncSupply
.
This make a ThreadPoolExecutor
with a PriorityBlockingQueue
useless. To
regain the Comparable
feature we have to unwrap the AsyncSupply
and
compare the original Runnable
.
stackoverflow
Note: this comparator imposes orderings that are inconsistent with equals.- Author:
- Matthias Eichner
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
MCRRunnableComperator
public MCRRunnableComperator()
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<Runnable>
-