private static final boolean _sameInfo(ServiceInfo info, ServiceInfo lastInfo) { if (info == null) return false; if (lastInfo == null) return false; if (!info.equals(lastInfo)) return false; byte[] text = info.getTextBytes(); byte[] lastText = lastInfo.getTextBytes(); if (text.length != lastText.length) return false; for (int i = 0; i < text.length; i++) { if (text[i] != lastText[i]) return false; } return true; }
private static final boolean _sameInfo(ServiceInfo info, ServiceInfo lastInfo) { if (info == null) return false; if (lastInfo == null) return false; if (!info.equals(lastInfo)) return false; byte[] text = info.getTextBytes(); byte[] lastText = lastInfo.getTextBytes(); if (text.length != lastText.length) return false; for (int i = 0; i < text.length; i++) { if (text[i] != lastText[i]) return false; } return true; }
private static final boolean _sameInfo(ServiceInfo info, ServiceInfo lastInfo) { if (info == null) return false; if (lastInfo == null) return false; if (!info.equals(lastInfo)) return false; byte[] text = info.getTextBytes(); byte[] lastText = lastInfo.getTextBytes(); if (text.length != lastText.length) return false; for (int i = 0; i < text.length; i++) { if (text[i] != lastText[i]) return false; } return true; }
private static final boolean _sameInfo(ServiceInfo info, ServiceInfo lastInfo) { if (info == null) return false; if (lastInfo == null) return false; if (!info.equals(lastInfo)) return false; byte[] text = info.getTextBytes(); byte[] lastText = lastInfo.getTextBytes(); if (text.length != lastText.length) return false; for (int i = 0; i < text.length; i++) { if (text[i] != lastText[i]) return false; } if (!info.hasSameAddresses(lastInfo)) return false; return true; }
/** * During recovery we need to duplicate service info to reregister them * * @param info */ ServiceInfoImpl(ServiceInfo info) { this._ipv4Addresses = Collections.synchronizedSet(new LinkedHashSet<Inet4Address>()); this._ipv6Addresses = Collections.synchronizedSet(new LinkedHashSet<Inet6Address>()); if (info != null) { this._domain = info.getDomain(); this._protocol = info.getProtocol(); this._application = info.getApplication(); this._name = info.getName(); this._subtype = info.getSubtype(); this._port = info.getPort(); this._weight = info.getWeight(); this._priority = info.getPriority(); this._text = info.getTextBytes(); this._persistent = info.isPersistent(); Inet6Address[] ipv6Addresses = info.getInet6Addresses(); for (Inet6Address address : ipv6Addresses) { this._ipv6Addresses.add(address); } Inet4Address[] ipv4Addresses = info.getInet4Addresses(); for (Inet4Address address : ipv4Addresses) { this._ipv4Addresses.add(address); } } this._state = new ServiceInfoState(this); }
/** * During recovery we need to duplicate service info to reregister them * * @param info */ ServiceInfoImpl(ServiceInfo info) { this._ipv4Addresses = Collections.synchronizedSet(new LinkedHashSet<Inet4Address>()); this._ipv6Addresses = Collections.synchronizedSet(new LinkedHashSet<Inet6Address>()); if (info != null) { this._domain = info.getDomain(); this._protocol = info.getProtocol(); this._application = info.getApplication(); this._name = info.getName(); this._subtype = info.getSubtype(); this._port = info.getPort(); this._weight = info.getWeight(); this._priority = info.getPriority(); this._text = info.getTextBytes(); this._persistent = info.isPersistent(); Inet6Address[] ipv6Addresses = info.getInet6Addresses(); for (Inet6Address address : ipv6Addresses) { this._ipv6Addresses.add(address); } Inet4Address[] ipv4Addresses = info.getInet4Addresses(); for (Inet4Address address : ipv4Addresses) { this._ipv4Addresses.add(address); } } this._state = new ServiceInfoState(this); }
/** * During recovery we need to duplicate service info to reregister them * * @param info */ ServiceInfoImpl(ServiceInfo info) { this._ipv4Addresses = Collections.synchronizedSet(new LinkedHashSet<Inet4Address>()); this._ipv6Addresses = Collections.synchronizedSet(new LinkedHashSet<Inet6Address>()); if (info != null) { this._domain = info.getDomain(); this._protocol = info.getProtocol(); this._application = info.getApplication(); this._name = info.getName(); this._subtype = info.getSubtype(); this._port = info.getPort(); this._weight = info.getWeight(); this._priority = info.getPriority(); this._text = info.getTextBytes(); this._persistent = info.isPersistent(); Inet6Address[] ipv6Addresses = info.getInet6Addresses(); for (Inet6Address address : ipv6Addresses) { this._ipv6Addresses.add(address); } Inet4Address[] ipv4Addresses = info.getInet4Addresses(); for (Inet4Address address : ipv4Addresses) { this._ipv4Addresses.add(address); } } this._state = new ServiceInfoState(this); }
/** * During recovery we need to duplicate service info to reregister them * * @param info */ ServiceInfoImpl(ServiceInfo info) { this._ipv4Addresses = Collections.synchronizedSet(new LinkedHashSet<Inet4Address>()); this._ipv6Addresses = Collections.synchronizedSet(new LinkedHashSet<Inet6Address>()); if (info != null) { this._domain = info.getDomain(); this._protocol = info.getProtocol(); this._application = info.getApplication(); this._name = info.getName(); this._subtype = info.getSubtype(); this._port = info.getPort(); this._weight = info.getWeight(); this._priority = info.getPriority(); this._text = info.getTextBytes(); this._persistent = info.isPersistent(); Inet6Address[] ipv6Addresses = info.getInet6Addresses(); for (Inet6Address address : ipv6Addresses) { this._ipv6Addresses.add(address); } Inet4Address[] ipv4Addresses = info.getInet4Addresses(); for (Inet4Address address : ipv4Addresses) { this._ipv4Addresses.add(address); } } this._state = new ServiceInfoState(this); }
if (cachedServiceEntryInfo != null) { cachedInfo = new ServiceInfoImpl(map, cachedServiceEntryInfo.getPort(), cachedServiceEntryInfo.getWeight(), cachedServiceEntryInfo.getPriority(), persistent, (byte[]) null); srvBytes = cachedServiceEntryInfo.getTextBytes(); server = cachedServiceEntryInfo.getServer(); cachedInfo.addAddress(address); cachedInfo._setText(cachedAddressInfo.getTextBytes()); cachedInfo.addAddress(address); cachedInfo._setText(cachedAddressInfo.getTextBytes()); ServiceInfo cachedTextInfo = ((DNSRecord) textEntry).getServiceInfo(persistent); if (cachedTextInfo != null) { cachedInfo._setText(cachedTextInfo.getTextBytes());
if (cachedServiceEntryInfo != null) { cachedInfo = new ServiceInfoImpl(map, cachedServiceEntryInfo.getPort(), cachedServiceEntryInfo.getWeight(), cachedServiceEntryInfo.getPriority(), persistent, (byte[]) null); srvBytes = cachedServiceEntryInfo.getTextBytes(); server = cachedServiceEntryInfo.getServer(); cachedInfo.addAddress(address); cachedInfo._setText(cachedAddressInfo.getTextBytes()); cachedInfo.addAddress(address); cachedInfo._setText(cachedAddressInfo.getTextBytes()); ServiceInfo cachedTextInfo = ((DNSRecord) textEntry).getServiceInfo(persistent); if (cachedTextInfo != null) { cachedInfo._setText(cachedTextInfo.getTextBytes());
if (cachedServiceEntryInfo != null) { cachedInfo = new ServiceInfoImpl(map, cachedServiceEntryInfo.getPort(), cachedServiceEntryInfo.getWeight(), cachedServiceEntryInfo.getPriority(), persistent, (byte[]) null); srvBytes = cachedServiceEntryInfo.getTextBytes(); server = cachedServiceEntryInfo.getServer(); cachedInfo.addAddress(address); cachedInfo._setText(cachedAddressInfo.getTextBytes()); cachedInfo.addAddress(address); cachedInfo._setText(cachedAddressInfo.getTextBytes()); ServiceInfo cachedTextInfo = ((DNSRecord) textEntry).getServiceInfo(persistent); if (cachedTextInfo != null) { cachedInfo._setText(cachedTextInfo.getTextBytes());
if (cachedServiceEntryInfo != null) { cachedInfo = new ServiceInfoImpl(map, cachedServiceEntryInfo.getPort(), cachedServiceEntryInfo.getWeight(), cachedServiceEntryInfo.getPriority(), persistent, (byte[]) null); srvBytes = cachedServiceEntryInfo.getTextBytes(); server = cachedServiceEntryInfo.getServer(); cachedInfo.addAddress(address); cachedInfo._setText(cachedAddressInfo.getTextBytes()); cachedInfo.addAddress(address); cachedInfo._setText(cachedAddressInfo.getTextBytes()); ServiceInfo cachedTextInfo = ((DNSRecord) textEntry).getServiceInfo(persistent); if (cachedTextInfo != null) { cachedInfo._setText(cachedTextInfo.getTextBytes());