public class SrvUtil
extends java.lang.Object
| Constructor and Description |
|---|
SrvUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<SRV> |
sortSrvRecords(java.util.Collection<SRV> srvRecords)
Sort the given collection of
SRV resource records by their priority and weight. |
public static java.util.List<SRV> sortSrvRecords(java.util.Collection<SRV> srvRecords)
SRV resource records by their priority and weight.
Sorting by priority is easy. Sorting the buckets of SRV records with the same priority by weight requires to choose those records randomly but taking the weight into account.
srvRecords - a collection of SRV records.