java.lang.Object
net.i2p.router.web.helpers.UDPSorters
Comparators for various columns.
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classComparator for sorting UDP peers by peer hash in ascending order.(package private) static classComparator for sorting UDP peers by congestion window in ascending order.(package private) static classComparator for sorting UDP peers by duplicate packets received in ascending order.(package private) static classComparator for sorting UDP peers by inbound idle time in ascending order.(package private) static classComparator for sorting UDP peers by outbound idle time in ascending order.(package private) static classComparator for sorting UDP peers by maximum transmission unit in ascending order.(package private) static classBase comparator for UDP peers that falls back to peer hash comparison.(package private) static classComparator for sorting UDP peers by inbound rate in ascending order.(package private) static classComparator for sorting UDP peers by outbound rate in ascending order.(package private) static classComparator for sorting UDP peers by received messages count in ascending order.(package private) static classComparator for sorting UDP peers by retransmitted packets in ascending order.(package private) static classComparator for sorting UDP peers by retransmission timeout in ascending order.(package private) static classComparator for sorting UDP peers by round trip time in ascending order.(package private) static classComparator for sorting UDP peers by sent messages count in ascending order.(package private) static classComparator for sorting UDP peers by clock skew in ascending order.(package private) static classComparator for sorting UDP peers by slow start threshold in ascending order.(package private) static classComparator for sorting UDP peers by uptime in ascending order.Field Summary
FieldsModifier and TypeFieldDescription(package private) static final intSort by peer hash.(package private) static final intSort by congestion window.(package private) static final intSort by duplicate packets.(package private) static final intSort by inbound idle time.(package private) static final intSort by outbound idle time.(package private) static final intSort by MTU.(package private) static final intSort by inbound rate.(package private) static final intSort by outbound rate.(package private) static final intSort by received message count.(package private) static final intSort by retransmitted packets.(package private) static final intSort by RTO.(package private) static final intSort by RTT.(package private) static final intSort by sent message count.(package private) static final intSort by clock skew.(package private) static final intSort by slow start threshold.(package private) static final intSort by uptime.Constructor Summary
ConstructorsConstructorDescriptionInstances are never needed; this is a holder for the flags and comparators.Method Summary
All MethodsModifier and TypeMethodDescription(package private) static voidappendSortLinks(StringBuilder buf, String urlBase, int sortFlags, String descr, int ascending) Append the pair of sort arrows for one column, marking the live direction of a column that is currently sorted on.(package private) static Comparator<PeerState> getComparator(int sortFlags) Select the comparator for a column, reversing it for a descending sort.
Field Details
FLAG_ALPHA
FLAG_IDLE_IN
FLAG_IDLE_OUT
FLAG_RATE_IN
FLAG_RATE_OUT
FLAG_SKEW
FLAG_CWND
FLAG_SSTHRESH
FLAG_RTT
FLAG_RTO
FLAG_MTU
FLAG_SEND
FLAG_RECV
FLAG_RESEND
FLAG_DUP
FLAG_UPTIME
Constructor Details
UDPSorters
UDPSorters()Instances are never needed; this is a holder for the flags and comparators.
Method Details
getComparator
Select the comparator for a column, reversing it for a descending sort.- Parameters:
sortFlags- one of the FLAG_ columns in this class; the magnitude picks the comparator and the sign sets the direction- Returns:
- comparator ordering PeerState by that column, or descending if sortFlags is negative; FLAG_ALPHA is the fallback
appendSortLinks
static void appendSortLinks(StringBuilder buf, String urlBase, int sortFlags, String descr, int ascending) Append the pair of sort arrows for one column, marking the live direction of a column that is currently sorted on.- Parameters:
buf- buffer receiving the spans and anchorsurlBase- page path the links point at, without a query string; this appends the "?transport=ssu&sort=N" partsortFlags- column and direction currently in effect, as passed togetComparator(int)descr- localized link title, used for both arrowsascending- column this control toggles; FLAG_ALPHA (0) emits a single descending link instead of a toggle