private ManagedSelector chooseSelector() { // The ++ increment here is not atomic, but it does not matter, // so long as the value changes sometimes, then connections will // be distributed over the available selectors. long s = _selectorIndex++; int index = (int)(s % getSelectorCount()); return _selectors[index]; }
private ManagedSelector chooseSelector() { // The ++ increment here is not atomic, but it does not matter, // so long as the value changes sometimes, then connections will // be distributed over the available selectors. long s = _selectorIndex++; int index = (int)(s % getSelectorCount()); return _selectors[index]; }
private ManagedSelector chooseSelector() { // The ++ increment here is not atomic, but it does not matter, // so long as the value changes sometimes, then connections will // be distributed over the available selectors. long s = _selectorIndex++; int index = (int)(s % getSelectorCount()); return _selectors[index]; }
@Override public int getNumberOfSelectors(HttpPort httpPort) { ServerConnector c = _portConnectorMap.get(httpPort); if (c != null) { return c.getSelectorManager().getSelectorCount(); } else { return -1; } }
candidate1 = _selectors[s % getSelectorCount()]; int index = (int)(s % getSelectorCount()); ManagedSelector candidate2 = _selectors[index];
threadPool.setMaxThreads(handlers + connector.getAcceptors() + connector.getSelectorManager().getSelectorCount()); embeddedJetty.addConnector(connector); for (int retry = 0; retry < PORT_HUNT_TRIES; retry++) {
server, connectorPrototype.getAcceptors(), connectorPrototype.getSelectorManager().getSelectorCount(), new InstrumentedConnectionFactory( new HttpConnectionFactory(httpConfiguration) server, connectorPrototype.getAcceptors(), connectorPrototype.getSelectorManager().getSelectorCount(), new InstrumentedConnectionFactory( new SslConnectionFactory(sslContextFactory, "http/1.1")
server, connectorPrototype.getAcceptors(), connectorPrototype.getSelectorManager().getSelectorCount(), new InstrumentedConnectionFactory( new HttpConnectionFactory(httpConfiguration) server, connectorPrototype.getAcceptors(), connectorPrototype.getSelectorManager().getSelectorCount(), new InstrumentedConnectionFactory( new SslConnectionFactory(sslContextFactory, "http/1.1")
int selectors = connector.getSelectorManager().getSelectorCount(); if (LOGGER.isDebugEnabled())
ServerConnector serverConnector = (ServerConnector) connector; message.append("acceptors=").append(serverConnector.getAcceptors()).append(","); message.append("selectors=").append(serverConnector.getSelectorManager().getSelectorCount());
selectors+=((ServerConnector)connector).getSelectorManager().getSelectorCount();
selectors+=((ServerConnector)connector).getSelectorManager().getSelectorCount();