Package org.minidns.util
Class SrvUtil
java.lang.Object
org.minidns.util.SrvUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionsortSrvRecords
(Collection<SRV> srvRecords) Sort the given collection ofSRV
resource records by their priority and weight.
-
Constructor Details
-
SrvUtil
public SrvUtil()
-
-
Method Details
-
sortSrvRecords
Sort the given collection ofSRV
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.
- Parameters:
srvRecords
- a collection of SRV records.- Returns:
- a sorted list of the given records.
-