Package org.duracloud.mill.ltp
Class MorselComparator
java.lang.Object
org.duracloud.mill.ltp.MorselComparator
- All Implemented Interfaces:
Comparator<Morsel>
The prioritization strategy for the
MorselQueue. The intention
is to ensure that spaces that have been started get worked before spaces that
haven't. Also, ideally morsels from different accounts are evenly dispersed
throughout the queue. So, given those motivations, here's an initial stab at
the logic.
1. Morsels with non-null markers should go first.
2. Otherwise, order by space followed by domain.- Author:
- Daniel Bernstein Date: Nov 7, 2013
-
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
-
MorselComparator
public MorselComparator()
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<Morsel>
-