Sets the maximum number of connections allowed.

@param maxConnections the maxConnections to set.
@return a reference to this RiakNode.
@see Builder#withMaxConnections(int)
978335
public RiakNode setMaxConnections(int maxConnections)
    {
        stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
        if (maxConnections >= getMinConnections())
        {
            permits.setMaxPermits(maxConnections);
        }
        else
        {
            throw new IllegalArgumentException("Max connections less than min connections");
        }
        // TODO: reap delta?
        return this;
    }
659833
protected B maxReservedStreams(int maxReservedStreams) {
        enforceConstraint("server", "connection", connection);
        enforceConstraint("server", "codec", decoder);
        enforceConstraint("server", "codec", encoder);

        this.maxReservedStreams = checkPositiveOrZero(maxReservedStreams, "maxReservedStreams");
        return self();
    }
1137373
public void setConnectionStatuses(java.util.Collection<TerminateConnectionStatus> connectionStatuses) {
        if (connectionStatuses == null) {
            this.connectionStatuses = null;
            return;
        }

        this.connectionStatuses = new com.amazonaws.internal.SdkInternalList<TerminateConnectionStatus>(connectionStatuses);
    }
160729
@Override
	public void setMaxHostConnections(int maxHostConnections) {
    	connectionManager.getParams().setDefaultMaxConnectionsPerHost(maxHostConnections);
    	connectionManager.getParams().setMaxConnectionsPerHost(hostConfiguration, maxHostConnections);
    }
551049
public void setConnectionProperties(Map connectionProperties)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "getConnectionProperties", connectionProperties);
            SibTr.exit(tc, "getConnectionProperties");
        }
        _connectionProperties = connectionProperties;
    }
678801
public void setConnections(java.util.Collection<Connection> connections) {
        if (connections == null) {
            this.connections = null;
            return;
        }

        this.connections = new java.util.ArrayList<Connection>(connections);
    }
589783
private void setupConnectionTable(IAtomContainer atomContainer) {
        int atomCount = atomContainer.getAtomCount();
        connectionTable = new int[atomCount][];
        if (!ignoreBondOrders) {
            bondOrders = new int[atomCount][];
        }
        for (int atomIndex = 0; atomIndex < atomCount; atomIndex++) {
            IAtom atom = atomContainer.getAtom(atomIndex);
            List<IAtom> connectedAtoms = atomContainer.getConnectedAtomsList(atom);
            int numConnAtoms = connectedAtoms.size();
            connectionTable[atomIndex] = new int[numConnAtoms];
            if (!ignoreBondOrders) {
                bondOrders[atomIndex] = new int[numConnAtoms];
            }
            int i = 0;
            for (IAtom connected : connectedAtoms) {
                int index = atomContainer.indexOf(connected);
                connectionTable[atomIndex][i] = index;
                if (!ignoreBondOrders) {
                    IBond bond = atomContainer.getBond(atom, connected);
                    boolean isArom = bond.getFlag(CDKConstants.ISAROMATIC);
                    int orderNumber = (isArom) ? 5 : bond.getOrder().numeric();
                    bondOrders[atomIndex][i] = orderNumber;
                    
                    // TODO
                    if (orderNumber > maxBondOrder) {
                        maxBondOrder = orderNumber;
                    }
                }
                i++;
            }
        }
    }
412435
final public long getConnects() {
		long total = 0;
		synchronized(poolLock) {
			for(PooledConnection<C> conn : allConnections) {
				total += conn.connectCount.get();
			}
		}
		return total;
	}
283261
public void setConnectivityInfo(java.util.Collection<ConnectivityInfo> connectivityInfo) {
        if (connectivityInfo == null) {
            this.connectivityInfo = null;
            return;
        }

        this.connectivityInfo = new java.util.ArrayList<ConnectivityInfo>(connectivityInfo);
    }
1304110
public void setConnections(java.util.Collection<ClientVpnConnection> connections) {
        if (connections == null) {
            this.connections = null;
            return;
        }

        this.connections = new com.amazonaws.internal.SdkInternalList<ClientVpnConnection>(connections);
    }
143574
public void setConnectorList(java.util.Collection<Connector> connectorList) {
        if (connectorList == null) {
            this.connectorList = null;
            return;
        }

        this.connectorList = new java.util.ArrayList<Connector>(connectorList);
    }
354555
public RowResultSet<R> resultSet(int maxRows) {
        if (maxRows <= 0) {
            return new RowResultSet<R>(getRows());
        } // end of if

        return new RowResultSet<R>(getRows().subList(0, maxRows));
    }
1164316
public void setVpcEndpointConnections(java.util.Collection<VpcEndpointConnection> vpcEndpointConnections) {
        if (vpcEndpointConnections == null) {
            this.vpcEndpointConnections = null;
            return;
        }

        this.vpcEndpointConnections = new com.amazonaws.internal.SdkInternalList<VpcEndpointConnection>(vpcEndpointConnections);
    }
566112
public void setMaxConcurrency(final Integer maxConcurrency) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "MaxConcurrency", maxConcurrency);
        }
        _maxConcurrency = maxConcurrency;

    }
934792
func SetConnectionLimit(maxCon int, blocking bool) {
	if maxCon > 0 {
		connectionLimit = make(chan struct{}, maxCon)
	} else if maxCon < 0 {
		connectionLimit = nil
	}
	blockingOnLimit = blocking
}
862984
public RiakNode setMinConnections(int minConnections)
    {
        stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
        if (minConnections <= getMaxConnections())
        {
            this.minConnections = minConnections;
        }
        else
        {
            throw new IllegalArgumentException("Min connections greater than max connections");
        }
        // TODO: Start / reap delta?
        return this;
    }
295174
public void setMax(java.lang.Object _max) {
		getStateHelper().put(PropertyKeys.max, _max);
	}