Lines Matching refs:srvRecords
155 SrvRecord[] srvRecords = new SrvRecord[numValues];
162 srvRecords[j] = new SrvRecord((String) attr.get(i));
174 System.arraycopy(srvRecords, 0, trimmed, 0, numRecords);
175 srvRecords = trimmed;
182 Arrays.sort(srvRecords);
186 hostports = extractHostports(srvRecords);
199 private static String[] extractHostports(SrvRecord[] srvRecords) {
206 for (int i = 0; i < srvRecords.length; i++) {
208 hostports = new String[srvRecords.length];
213 while (i < srvRecords.length - 1 &&
214 srvRecords[i].priority == srvRecords[i + 1].priority) {
222 hostports[k++] = selectHostport(srvRecords, head, tail);
232 private static String selectHostport(SrvRecord[] srvRecords, int head,
235 return srvRecords[head].hostport;
241 if (srvRecords[i] != null) {
242 sum += srvRecords[i].weight;
243 srvRecords[i].sum = sum;
252 if (srvRecords[i] != null && srvRecords[i].sum >= target) {
253 hostport = srvRecords[i].hostport;
254 srvRecords[i] = null; // make this record unavailable