/** * Iterate only over items with matching name. Returns an list of DNSEntry or null. To retrieve all entries, one must iterate over this linked list. * * @param name * @return list of DNSEntries */ public synchronized Collection<? extends DNSEntry> getDNSEntryList(String name) { Collection<? extends DNSEntry> entryList = this._getDNSEntryList(name); if (entryList != null) { entryList = new ArrayList<DNSEntry>(entryList); } else { entryList = Collections.emptyList(); } return entryList; }
/** * Iterate only over items with matching name. Returns an list of DNSEntry or null. To retrieve all entries, one must iterate over this linked list. * * @param name * @return list of DNSEntries */ public synchronized Collection<? extends DNSEntry> getDNSEntryList(String name) { Collection<? extends DNSEntry> entryList = this._getDNSEntryList(name); if (entryList != null) { entryList = new ArrayList<DNSEntry>(entryList); } else { entryList = Collections.emptyList(); } return entryList; }
/** * Iterate only over items with matching name. Returns an list of DNSEntry or null. To retrieve all entries, one must iterate over this linked list. * * @param name * @return list of DNSEntries */ public Collection<? extends DNSEntry> getDNSEntryList(String name) { Collection<? extends DNSEntry> entryList = this._getDNSEntryList(name); if (entryList != null) { synchronized (entryList) { entryList = new ArrayList<DNSEntry>(entryList); } } else { entryList = Collections.emptyList(); } return entryList; }
/** * Get all matching DNS entries from the table. * * @param name * @param type * @param recordClass * @return list of entries */ public Collection<? extends DNSEntry> getDNSEntryList(String name, DNSRecordType type, DNSRecordClass recordClass) { Collection<? extends DNSEntry> entryList = this._getDNSEntryList(name); if (entryList != null) { synchronized (entryList) { entryList = new ArrayList<DNSEntry>(entryList); for (Iterator<? extends DNSEntry> i = entryList.iterator(); i.hasNext();) { DNSEntry testDNSEntry = i.next(); if (!testDNSEntry.matchRecordType(type) || (!testDNSEntry.matchRecordClass(recordClass))) { i.remove(); } } } } else { entryList = Collections.emptyList(); } return entryList; }
/** * Get a matching DNS entry from the table (using isSameEntry). Returns the entry that was found. * * @param dnsEntry * @return DNSEntry */ public synchronized DNSEntry getDNSEntry(DNSEntry dnsEntry) { DNSEntry result = null; if (dnsEntry != null) { Collection<? extends DNSEntry> entryList = this._getDNSEntryList(dnsEntry.getKey()); if (entryList != null) { for (DNSEntry testDNSEntry : entryList) { if (testDNSEntry.isSameEntry(dnsEntry)) { result = testDNSEntry; break; } } } } return result; }
/** * Get all matching DNS entries from the table. * * @param name * @param type * @param recordClass * @return list of entries */ public synchronized Collection<? extends DNSEntry> getDNSEntryList(String name, DNSRecordType type, DNSRecordClass recordClass) { Collection<? extends DNSEntry> entryList = this._getDNSEntryList(name); if (entryList != null) { entryList = new ArrayList<DNSEntry>(entryList); for (Iterator<? extends DNSEntry> i = entryList.iterator(); i.hasNext();) { DNSEntry testDNSEntry = i.next(); if (!testDNSEntry.getRecordType().equals(type) || ((DNSRecordClass.CLASS_ANY != recordClass) && !testDNSEntry.getRecordClass().equals(recordClass))) { i.remove(); } } } else { entryList = Collections.emptyList(); } return entryList; }
/** * Get all matching DNS entries from the table. * * @param name * @param type * @param recordClass * @return list of entries */ public synchronized Collection<? extends DNSEntry> getDNSEntryList(String name, DNSRecordType type, DNSRecordClass recordClass) { Collection<? extends DNSEntry> entryList = this._getDNSEntryList(name); if (entryList != null) { entryList = new ArrayList<DNSEntry>(entryList); for (Iterator<? extends DNSEntry> i = entryList.iterator(); i.hasNext();) { DNSEntry testDNSEntry = i.next(); if (!testDNSEntry.getRecordType().equals(type) || ((DNSRecordClass.CLASS_ANY != recordClass) && !testDNSEntry.getRecordClass().equals(recordClass))) { i.remove(); } } } else { entryList = Collections.emptyList(); } return entryList; }
/** * Get a matching DNS entry from the table. * * @param name * @param type * @param recordClass * @return DNSEntry */ public DNSEntry getDNSEntry(String name, DNSRecordType type, DNSRecordClass recordClass) { DNSEntry result = null; Collection<? extends DNSEntry> entryList = this._getDNSEntryList(name); if (entryList != null) { synchronized (entryList) { for (DNSEntry testDNSEntry : entryList) { if (testDNSEntry.matchRecordType(type) && testDNSEntry.matchRecordClass(recordClass)) { result = testDNSEntry; break; } } } } return result; }
/** * Get a matching DNS entry from the table (using isSameEntry). Returns the entry that was found. * * @param dnsEntry * @return DNSEntry */ public synchronized DNSEntry getDNSEntry(DNSEntry dnsEntry) { DNSEntry result = null; if (dnsEntry != null) { Collection<? extends DNSEntry> entryList = this._getDNSEntryList(dnsEntry.getKey()); if (entryList != null) { for (DNSEntry testDNSEntry : entryList) { if (testDNSEntry.isSameEntry(dnsEntry)) { result = testDNSEntry; break; } } } } return result; }
/** * Get a matching DNS entry from the table (using isSameEntry). Returns the entry that was found. * * @param dnsEntry * @return DNSEntry */ public DNSEntry getDNSEntry(DNSEntry dnsEntry) { DNSEntry result = null; if (dnsEntry != null) { Collection<? extends DNSEntry> entryList = this._getDNSEntryList(dnsEntry.getKey()); if (entryList != null) { synchronized (entryList) { for (DNSEntry testDNSEntry : entryList) { if (testDNSEntry.isSameEntry(dnsEntry)) { result = testDNSEntry; break; } } } } } return result; }
/** * Get a matching DNS entry from the table. * * @param name * @param type * @param recordClass * @return DNSEntry */ public synchronized DNSEntry getDNSEntry(String name, DNSRecordType type, DNSRecordClass recordClass) { DNSEntry result = null; Collection<? extends DNSEntry> entryList = this._getDNSEntryList(name); if (entryList != null) { for (DNSEntry testDNSEntry : entryList) { if (testDNSEntry.getRecordType().equals(type) && ((DNSRecordClass.CLASS_ANY == recordClass) || testDNSEntry.getRecordClass().equals(recordClass))) { result = testDNSEntry; break; } } } return result; }
/** * Get a matching DNS entry from the table. * * @param name * @param type * @param recordClass * @return DNSEntry */ public synchronized DNSEntry getDNSEntry(String name, DNSRecordType type, DNSRecordClass recordClass) { DNSEntry result = null; Collection<? extends DNSEntry> entryList = this._getDNSEntryList(name); if (entryList != null) { for (DNSEntry testDNSEntry : entryList) { if (testDNSEntry.getRecordType().equals(type) && ((DNSRecordClass.CLASS_ANY == recordClass) || testDNSEntry.getRecordClass().equals(recordClass))) { result = testDNSEntry; break; } } } return result; }