@Override
    public void updateProxyNodes(boolean nodeChanged, List<HostInfo> newProxyNodes) {
        if (this.senderStatus.get() == SENDER_STATUS_CLOSED
                || newProxyNodes == null || newProxyNodes.isEmpty()) {
            return;
        }
        this.fsLock.writeLock().lock();
        try {
            boolean found;
            List<String> rmvNodes = new ArrayList<>();
            for (String hostRefName : this.proxyNodeInfos.keySet()) {
                found = false;
                for (HostInfo hostInfo : newProxyNodes) {
                    if (hostRefName.equals(hostInfo.getReferenceName())) {
                        found = true;
                        break;
                    }
                }
                if (!found) {
                    rmvNodes.add(hostRefName);
                }
            }
            for (HostInfo hostInfo : newProxyNodes) {
                if (this.proxyNodeInfos.containsKey(hostInfo.getReferenceName())) {
                    continue;
                }
                this.proxyNodeInfos.put(hostInfo.getReferenceName(), hostInfo);
            }
            for (String rmvNode : rmvNodes) {
                this.proxyNodeInfos.remove(rmvNode);
            }
            clientMgr.updateProxyInfoList(nodeChanged, this.proxyNodeInfos);
        } finally {
            this.fsLock.writeLock().unlock();
        }
    }
Base Sender class:

Used to manage Sender metadata information, including Sender ID,
 status, network interaction, metadata query object, and
 Proxy node metadata information obtained from Manager, etc.
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/sender/BaseSender.java