Lines Matching refs:srvRecords
145 SrvRecord[] srvRecords = new SrvRecord[numValues];
152 srvRecords[j] = new SrvRecord((String) attr.get(i));
164 System.arraycopy(srvRecords, 0, trimmed, 0, numRecords);
165 srvRecords = trimmed;
172 Arrays.sort(srvRecords);
176 hostports = extractHostports(srvRecords);
188 private static String[] extractHostports(SrvRecord[] srvRecords) {
195 for (int i = 0; i < srvRecords.length; i++) {
197 hostports = new String[srvRecords.length];
202 while (i < srvRecords.length - 1 &&
203 srvRecords[i].priority == srvRecords[i + 1].priority) {
211 hostports[k++] = selectHostport(srvRecords, head, tail);
221 private static String selectHostport(SrvRecord[] srvRecords, int head,
224 return srvRecords[head].hostport;
230 if (srvRecords[i] != null) {
231 sum += srvRecords[i].weight;
232 srvRecords[i].sum = sum;
241 if (srvRecords[i] != null && srvRecords[i].sum >= target) {
242 hostport = srvRecords[i].hostport;
243 srvRecords[i] = null; // make this record unavailable