java.lang.Object
net.i2p.router.web.helpers.UDPSorters.PeerComparator
net.i2p.router.web.helpers.UDPSorters.RateInComparator
- All Implemented Interfaces:
Serializable, Comparator<PeerState>
- Enclosing class:
UDPSorters
Comparator for sorting UDP peers by inbound rate in ascending order.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longTime the comparator was made, so rates are read consistentlyConstructor Summary
ConstructorsConstructorDescriptionDefault constructor; snapshots the clock for the bps comparison.Method Summary
All MethodsMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, max, min, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Field Details
now
private final long nowTime the comparator was made, so rates are read consistently
Constructor Details
RateInComparator
RateInComparator()Default constructor; snapshots the clock for the bps comparison.
Method Details
compare
Orders peers by inbound rate over the sampled minute.- Specified by:
comparein interfaceComparator<PeerState>- Overrides:
comparein classUDPSorters.PeerComparator