Call all_ports_ready for a primitive operator.
191723
def _splpy_all_ports_ready(callable_):
    """"""
    if hasattr(type(callable_), 'all_ports_ready'):
        try:
            return callable_.all_ports_ready()
        except:
            ei = sys.exc_info()
            if streamsx._streams._runtime._call_exit(callable_, ei):
                return None
            raise e1[1]
    return None
544538
def port_bindings(self, value):
        
        if isinstance(value, (list, dict)):
                self._port_bindings = self._convert_port_bindings(value)
        elif value is None:
            self._port_bindings = None
        else:
            raise TypeError('port bindings must be a dict, list, or None. {0} was passed.'.format(type(value)))
44619
public static AltsServerBuilder forPort(int port) {
    NettyServerBuilder nettyDelegate = NettyServerBuilder.forAddress(new InetSocketAddress(port));
    return new AltsServerBuilder(nettyDelegate);
  }
1118718
def p_ports(self, p):
        ''
        wid = None
        port = Port(name=p[3], width=wid, type=None, lineno=p.lineno(1))
        p[0] = p[1] + (port,)
        p.set_lineno(0, p.lineno(1))
257889
def splitport(host):
    """"""
    global _portprog
    if _portprog is None:
        import re
        _portprog = re.compile('^(.*):([0-9]+)$')

    match = _portprog.match(host)
    if match: return match.group(1, 2)
    return host, None
1351809
def _parse_ports(port_values: dict) -> dict:
        
        # Initialising empty dictionary
        endpoints = {}

        for port_element in port_values:
            target_port = port_element.split(':')
            for port in target_port:
                endpoints[int(port)] = int(port)

        # Setting the types
        endpoint_spec = docker.types.EndpointSpec(ports=endpoints)
        return endpoint_spec
916756
def p_portlist_paren_empty(self, p):
        ''
        p[0] = Portlist(ports=(), lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
157616
def return_port(port):
    """"""
    if port in _random_ports:
        _random_ports.remove(port)
    elif port in _owned_ports:
        _owned_ports.remove(port)
        _free_ports.add(port)
    elif port in _free_ports:
        logging.info("Returning a port that was already returned: %s", port)
    else:
        logging.info("Returning a port that wasn't given by portpicker: %s",
                     port)
958967
def _parse_ports(self, ports):
        
        if not ports:
            return []

        return [tuple(port_pair.split("::")) for port_pair in ports.strip(";").split(";")]
23186
async def resolve(self, host: str,
                      port: int, family: int) -> List[Dict[str, Any]]:
        """"""
1243479
def p_portlist(self, p):
        ''
        p[0] = Portlist(ports=p[2], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
545710
def ports(self):
        ''''''
        with self._mutex:
            if not self._ports:
                self._ports = [ports.parse_port(port, self) \
                               for port in self._obj.get_ports()]
        return self._ports
563351
private void prepareRootFhAndNfsPort() throws IOException {

        if (!_prepareLock.tryLock()) {
            return;
        }

        try {
            _port = getNfsPortFromServer();
            _rpcWrapper.setPort(_port);
            _rootFileHandle = lookupRootHandle();
        } finally {
            _prepareLock.unlock();
        }
    }
686645
def ensure_port_cleanup(bound_addresses, maxtries=30, sleeptime=2):
    
    atexit.register(_cleanup_ports, bound_addresses, maxtries=maxtries,
                    sleeptime=sleeptime)
557645
def pick_contiguous_unused_ports(
    num_ports,
    retry_interval_secs=3,
    retry_attempts=5):
  """"""
  for _ in range(retry_attempts):
    start_port = portpicker.pick_unused_port()
    if start_port is not None:
      ports = [start_port + p for p in range(num_ports)]
      if all(portpicker.is_port_free(p) for p in ports):
        return ports
      else:
        return_ports(ports)

    time.sleep(retry_interval_secs)

  raise RuntimeError("Unable to obtain %d contiguous unused ports." % num_ports)
198967
def connected_inports(self):
        '''

        '''
        return [p for p in self.ports \
                if p.__class__.__name__ == 'DataInPort' and p.is_connected]
1139571
public synchronized void applyToAll(SocketOperator op) throws Exception {
        Enumeration keys = allSockets.keys();
        while (keys.hasMoreElements()) {
            SocketBox myBox = (SocketBox) keys.nextElement();
            op.operate(myBox);
        }
    }