@Test public void testSimpleSelection2() throws Exception { NetworkOrganizer organizer = new NetworkOrganizer("127.0.0.0/24"); String ip = organizer.getMatchingAddress(); assertEquals("127.0.0.1", ip); }
public String getMatchingAddress() { if (informationCollection.size() > 1) this.informationCollection = buildLocalInformation(); List<String> list = getSubset(1); if (list.size() < 1) throw new ND4JIllegalStateException( "Unable to find network interface matching requested mask: " + networkMask); if (list.size() > 1) log.warn("We have {} local IPs matching given netmask [{}]", list.size(), networkMask); return list.get(0); }
NetworkOrganizer { public String getMatchingAddress() { if (informationCollection.size() > 1) this.informationCollection = buildLocalInformation(); List<String> list = getSubset(1); if (list.size() < 1) throw new ND4JIllegalStateException( "Unable to find network interface matching requested mask: " + networkMask); if (list.size() > 1) log.warn("We have {} local IPs matching given netmask [{}]", list.size(), networkMask); return list.get(0); } }
NetworkOrganizer { public String getMatchingAddress() { if (informationCollection.size() > 1) this.informationCollection = buildLocalInformation(); List<String> list = getSubset(1); if (list.size() < 1) throw new ND4JIllegalStateException( "Unable to find network interface matching requested mask: " + networkMask); if (list.size() > 1) log.warn("We have {} local IPs matching given netmask [{}]", list.size(), networkMask); return list.get(0); } protected  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet);  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet, String mask);  NetworkOrganizer(@NonNull String networkMask); }
NetworkOrganizer { public String getMatchingAddress() { if (informationCollection.size() > 1) this.informationCollection = buildLocalInformation(); List<String> list = getSubset(1); if (list.size() < 1) throw new ND4JIllegalStateException( "Unable to find network interface matching requested mask: " + networkMask); if (list.size() > 1) log.warn("We have {} local IPs matching given netmask [{}]", list.size(), networkMask); return list.get(0); } protected  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet);  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet, String mask);  NetworkOrganizer(@NonNull String networkMask); String getMatchingAddress(); List<String> getSubset(int numShards); List<String> getSubset(int numShards, Collection<String> primary); }
NetworkOrganizer { public String getMatchingAddress() { if (informationCollection.size() > 1) this.informationCollection = buildLocalInformation(); List<String> list = getSubset(1); if (list.size() < 1) throw new ND4JIllegalStateException( "Unable to find network interface matching requested mask: " + networkMask); if (list.size() > 1) log.warn("We have {} local IPs matching given netmask [{}]", list.size(), networkMask); return list.get(0); } protected  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet);  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet, String mask);  NetworkOrganizer(@NonNull String networkMask); String getMatchingAddress(); List<String> getSubset(int numShards); List<String> getSubset(int numShards, Collection<String> primary);  }