Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/318#discussion_r77644176
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/location/access/PortForwardManagerImpl.java
 ---
    @@ -356,117 +343,18 @@ private AssociationMetadata 
associationMetadataFromPortMapping(PortMapping portM
     
         
         
///////////////////////////////////////////////////////////////////////////////////
    -    // Deprecated
    -    
///////////////////////////////////////////////////////////////////////////////////
    -
    -    @Override
    -    @Deprecated
    -    public PortMapping acquirePublicPortExplicit(String publicIpId, int 
port) {
    -        PortMapping mapping = new PortMapping(publicIpId, port, null, -1);
    -        log.debug("assigning explicit public port "+port+" at 
"+publicIpId);
    -        PortMapping result;
    -        synchronized (mutex) {
    -            result = mappings.put(makeKey(publicIpId, port), mapping);
    -        }
    -        onChanged();
    -        return result;
    -    }
    -
    -    @Override
    -    @Deprecated
    -    public boolean forgetPortMapping(PortMapping m) {
    -        return forgetPortMapping(m.publicIpId, m.publicPort);
    -    }
    -
    -    @Override
    -    @Deprecated
    -    public void recordPublicIpHostname(String publicIpId, String 
hostnameOrPublicIpAddress) {
    -        log.debug("recording public IP "+publicIpId+" associated with 
"+hostnameOrPublicIpAddress);
    -        synchronized (mutex) {
    -            String old = publicIpIdToHostname.put(publicIpId, 
hostnameOrPublicIpAddress);
    -            if (old!=null && !old.equals(hostnameOrPublicIpAddress))
    -                log.warn("Changing hostname recorded against public IP 
"+publicIpId+"; from "+old+" to "+hostnameOrPublicIpAddress);
    -        }
    -        onChanged();
    -    }
    -
    -    @Override
    -    @Deprecated
    -    public String getPublicIpHostname(String publicIpId) {
    -        synchronized (mutex) {
    -            return publicIpIdToHostname.get(publicIpId);
    -        }
    -    }
    -    
    -    @Override
    -    @Deprecated
    -    public boolean forgetPublicIpHostname(String publicIpId) {
    -        log.debug("forgetting public IP "+publicIpId+" association");
    -        boolean result;
    -        synchronized (mutex) {
    -            result = (publicIpIdToHostname.remove(publicIpId) != null);
    -        }
    -        onChanged();
    -        return result;
    -    }
    -
    -    @Override
    -    @Deprecated
    -    public int acquirePublicPort(String publicIpId, Location l, int 
privatePort) {
    -        int publicPort;
    -        synchronized (mutex) {
    -            PortMapping old = getPortMappingWithPrivateSide(l, 
privatePort);
    -            // only works for 1 public IP ID per location (which is the 
norm)
    -            if (old!=null && old.publicIpId.equals(publicIpId)) {
    -                log.debug("request to acquire public port at 
"+publicIpId+" for "+l+":"+privatePort+", reusing old assignment "+old);
    -                return old.getPublicPort();
    -            }
    -            
    -            publicPort = acquirePublicPort(publicIpId);
    -            log.debug("request to acquire public port at "+publicIpId+" 
for "+l+":"+privatePort+", allocating "+publicPort);
    -            associateImpl(publicIpId, publicPort, l, privatePort);
    -        }
    -        onChanged();
    -        return publicPort;
    -    }
    -
    -    @Override
    -    @Deprecated
    -    public void associate(String publicIpId, int publicPort, Location l, 
int privatePort) {
    -        synchronized (mutex) {
    -            associateImpl(publicIpId, publicPort, l, privatePort);
    -        }
    -        onChanged();
    -    }
    -
    -    protected void associateImpl(String publicIpId, int publicPort, 
Location l, int privatePort) {
    -        synchronized (mutex) {
    -            PortMapping mapping = new PortMapping(publicIpId, publicPort, 
l, privatePort);
    -            PortMapping oldMapping = 
getPortMappingWithPublicSide(publicIpId, publicPort);
    -            log.debug("associating public port "+publicPort+" on 
"+publicIpId+" with private port "+privatePort+" at "+l+" ("+mapping+")"
    -                    +(oldMapping == null ? "" : " (overwriting 
"+oldMapping+" )"));
    -            mappings.put(makeKey(publicIpId, publicPort), mapping);
    -        }
    -    }
    -
    -    
///////////////////////////////////////////////////////////////////////////////////
         // Internal only; make protected when deprecated interface method 
removed
         
///////////////////////////////////////////////////////////////////////////////////
    --- End diff --
    
    Can remove TODO now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to