Updates mapping between tracker names and adresses
@param trackerName name of tracker
@param addr address of the tracker
770672
public void updateTrackerAddr(String trackerName, InetAddress addr) {
    synchronized (lockObject) {
      trackerAddress.put(trackerName, addr);
    }
  }
299361
public void setAddresses(java.util.Collection<Address> addresses) {
        if (addresses == null) {
            this.addresses = null;
            return;
        }

        this.addresses = new com.amazonaws.internal.SdkInternalList<Address>(addresses);
    }
69337
public boolean setAddress(final String addr)
    {
        //  Convert the textual address into address structure.
        address = new TcpAddress(addr, options.ipv6);
        endpoint = address.toString();

        //  Create a listening socket.
        try {
            if (options.selectorChooser == null) {
                fd = ServerSocketChannel.open();
            }
            else {
                fd = options.selectorChooser.choose(address, options).openServerSocketChannel();
            }

            // On some systems, IPv4 mapping in IPv6 sockets is disabled by default.
            // Switch it on in such cases.
            // The method enableIpv4Mapping is empty. Still to be written
            if (address.family() == StandardProtocolFamily.INET6) {
                TcpUtils.enableIpv4Mapping(fd);
            }

            TcpUtils.unblockSocket(fd);

            //  Set the socket buffer limits for the underlying socket.
            if (options.sndbuf != 0) {
                TcpUtils.setTcpSendBuffer(fd, options.sndbuf);
            }
            if (options.rcvbuf != 0) {
                TcpUtils.setTcpReceiveBuffer(fd, options.rcvbuf);
            }

            if (!isWindows) {
                TcpUtils.setReuseAddress(fd, true);
            }

            //  Bind the socket to the network interface and port.
            // NB: fd.socket().bind(...) for Android environments
            fd.socket().bind(address.address(), options.backlog);
            // find the address in case of wildcard
            endpoint = getAddress();
        }
        catch (IOException e) {
            close();
            errno.set(ZError.EADDRINUSE);
            return false;
        }
        socket.eventListening(endpoint, fd);
        return true;
    }
1210898
boolean registerEndpoint(String addr, Endpoint endpoint)
    {
        endpointsSync.lock();

        Endpoint inserted = null;
        try {
            inserted = endpoints.put(addr, endpoint);
        }
        finally {
            endpointsSync.unlock();
        }
        if (inserted != null) {
            return false;
        }
        return true;
    }
796884
public void setInAppStreamNames(java.util.Collection<String> inAppStreamNames) {
        if (inAppStreamNames == null) {
            this.inAppStreamNames = null;
            return;
        }

        this.inAppStreamNames = new java.util.ArrayList<String>(inAppStreamNames);
    }
314369
private String getTrackerAddressConfigString() {
        StringBuffer config = new StringBuffer();
        for (int i = 0; i < trackerAddressCircular.size(); i++) {
            TrackerAddressHolder holder = trackerAddressCircular.next();
            InetSocketAddress address = holder.getAddress();
            config.append(address.toString()).append(",");
        }
        return new String(config);
    }
465674
public void addPeer(TrackedPeer peer) {
    this.peers.put(new PeerUID(peer.getAddress(), this.getHexInfoHash()), peer);
  }
1347473
private static boolean isIPv4MappedAddress(final byte[] addr) {
    if (addr.length < INADDR16SZ) {
      return false;
    }
    return addr[0] == 0x00 && addr[1] == 0x00 && addr[2] == 0x00 && addr[3] == 0x00
        && addr[4] == 0x00 && addr[5] == 0x00 && addr[6] == 0x00 && addr[7] == 0x00
        && addr[8] == 0x00 && addr[9] == 0x00 && addr[10] == (byte) 0xff && addr[11] == (byte) 0xff;
  }
568547
public static boolean isLocalAddress(final InetAddress addr)
	{
		if (addr.isLoopbackAddress())
		{
			return true;
		}

		try
		{
			Enumeration<NetworkInterface> nics = NetworkInterface.getNetworkInterfaces();

			while (nics.hasMoreElements())
			{
				Enumeration<InetAddress> addrs = nics.nextElement().getInetAddresses();

				while (addrs.hasMoreElements())
				{
					if (addrs.nextElement().equals(addr))
					{
						return true; // Search successful
					}
				}
			}
		}
		catch (SocketException e)
		{
			log.debug(e.getMessage(), e);
		}

		log.debug("[FileHelper] {isLocalAddress} not local: " + addr.getHostAddress());

		// Search failed
		return false;
	}
378379
private void set(String name, String location) {
    if (name != null && name.contains(PATH_SEPARATOR_STR))
      throw new IllegalArgumentException(
                                         "Network location name contains /: "+name);
    this.name = (name==null)?"":name;
    this.location = location;      
  }
98890
public synchronized void setTrackBytes(boolean trackBytes)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setTrackBytes", trackBytes);
      this.trackBytes = trackBytes;
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setTrackBytes");
   }
1243091
public void updateSet (String setName, DSet.Entry entry)
    {
        requestEntryUpdate(setName, getSet(setName), entry);
    }
1112155
public static byte[] convertFromIPv4MappedAddress(final byte[] addr) { // NOPMD
    if (isIPv4MappedAddress(addr)) {
      final byte[] newAddr = new byte[INADDR4SZ];
      System.arraycopy(addr, 12, newAddr, 0, INADDR4SZ);
      return newAddr;
    }
    return null;
  }
1291474
void addNewTracker(TaskTracker taskTracker) {
    TaskTrackerStatus status = taskTracker.getStatus();
    trackerExpiryQueue.add(status);

    //  Register the tracker if its not registered
    String hostname = status.getHost();
    if (getNode(status.getTrackerName()) == null) {
      // Making the network location resolution inline ..
      resolveAndAddToTopology(hostname);
    }

    // add it to the set of tracker per host
    Set<TaskTracker> trackers = hostnameToTaskTracker.get(hostname);
    if (trackers == null) {
      trackers = Collections.synchronizedSet(new HashSet<TaskTracker>());
      hostnameToTaskTracker.put(hostname, trackers);
    }
    statistics.taskTrackerAdded(status.getTrackerName());
    getInstrumentation().addTrackers(1);
    LOG.info("Adding tracker " + status.getTrackerName() + " to host "
             + hostname);
    trackers.add(taskTracker);
  }
298749
public boolean isFaulty(String trackerName) {
    synchronized (this) {
      NodeUsageReport usageReport = usageReports.get(trackerName);
      return isDeadTracker(trackerName) || (usageReport != null &&
             (usageReport.getNumFailedConnections() > maxFailedConnections ||
              usageReport.getNumFailed() > maxFailures));
    }
  }
1255695
public void setNamedBindings(Map<String, Object> namedBindings) {
    if (namedBindings == null) {
      throw new IllegalArgumentException("namedBindings cannot be null");
    }
    this.namedBindings = namedBindings;
  }
607184
public void registerJavaPropertyNameProcessor( Class target, PropertyNameProcessor propertyNameProcessor ) {
      if( target != null && propertyNameProcessor != null ) {
         javaPropertyNameProcessorMap.put( target, propertyNameProcessor );
      }
   }