Returns the maximum number of connections allowed.

@return the maxConnections
@see Builder#withMaxConnections(int)
199099
public int getMaxConnections()
    {
        stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
        return permits.getMaxPermits();
    }
412435
final public long getConnects() {
		long total = 0;
		synchronized(poolLock) {
			for(PooledConnection<C> conn : allConnections) {
				total += conn.connectCount.get();
			}
		}
		return total;
	}
1238023
Set<ConnectionManager> getConnectionManagers()
   {
      if (cmToCl == null)
         return Collections.unmodifiableSet(Collections.emptySet());

      return Collections.unmodifiableSet(cmToCl.keySet());
   }
634706
@Nonnull
  public FineUploader5Core setMaxConnections (@Nonnegative final int nMaxConnections)
  {
    ValueEnforcer.isGT0 (nMaxConnections, "MaxConnections");
    m_nCoreMaxConnections = nMaxConnections;
    return this;
  }
502201
public java.util.List<VpcEndpointConnection> getVpcEndpointConnections() {
        if (vpcEndpointConnections == null) {
            vpcEndpointConnections = new com.amazonaws.internal.SdkInternalList<VpcEndpointConnection>();
        }
        return vpcEndpointConnections;
    }
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;
    }
746661
public int getMaxFailedDeliveries()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getMaxFailedDeliveries"); 
    
    if (_maxFailedDeliveries < 0)
      _maxFailedDeliveries = definition.getMaxFailedDeliveries();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getMaxFailedDeliveries", Integer.valueOf(_maxFailedDeliveries));
    
    return _maxFailedDeliveries;
  }
1193351
def allow_inbound_connection(self):
        
        LOGGER.debug("Determining whether inbound connection should "
                     "be allowed. num connections: %s max %s",
                     len(self._connections),
                     self._max_incoming_connections)
        return self._max_incoming_connections >= len(self._connections)
861169
protected function limit()
    {
        if (($connectionLimit = config('ratchet.connectionLimit')) && $this->connections - 1 >= $connectionLimit) {
            $this->console->info(sprintf('To many connections: %d of %d', $this->connections - 1, $connectionLimit));
            $this->conn->send(trans('ratchet::messages.tooManyConnections'));
            $this->conn->close();
        }

        return $this;
    }
271841
public int getMaxActiveMessages()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "getMaxActiveMessages");
            SibTr.exit(tc, "getMaxActiveMessages", Integer.valueOf(_maxActiveMessages));
        }
        return _maxActiveMessages;
    }
976085
private int getMaxConfiguredReplicaCount() {
        if (maxConfiguredReplicaCount > 0) {
            return maxConfiguredReplicaCount;
        } else {
            final ClientMessage request = PNCounterGetConfiguredReplicaCountCodec.encodeRequest(name);
            final ClientMessage response = invoke(request);
            final PNCounterGetConfiguredReplicaCountCodec.ResponseParameters resultParameters
                    = PNCounterGetConfiguredReplicaCountCodec.decodeResponse(response);
            maxConfiguredReplicaCount = resultParameters.response;
        }
        return maxConfiguredReplicaCount;
    }
1028708
public Connection getConnection() throws IOException {
		Connection conn = null;
		if (this.datasource != null) {
			try {
				conn = this.datasource.getConnection();
			} catch (SQLException e) {
				throw new IOException(e);
			}
		}
		return conn;
	}
1227584
public SettingsPack connectionsLimit(int value) {
        sp.set_int(settings_pack.int_types.connections_limit.swigValue(), value);
        return this;
    }
1143816
public Map<String, Object> getOutboundConnectionInfo() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "getOutboundConnectionInfo");
        Map<String, Object> outboundConnectionInfo = ThreadManager.getInstance().getOutboundConnectionInfo();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "getOutboundConnectionInfo", outboundConnectionInfo);
        return outboundConnectionInfo;
    }
408818
public void updateMaxConnections (final int max) {

        try {
            Connection conn = taskBalancer.getConnection();
            int update = 0;
            int targetMaxC = connections.peek().getSettingAsInt(OperationalTextKey.MAX_CONNECTIONS);
            if (targetMaxC <= max) {
                if (targetMaxC > maxConnections) {
                    update = targetMaxC - maxConnections;
                    maxConnections = targetMaxC;
                }
            } else {
                if (max >= maxConnections) {
                    update = max - maxConnections;
                    maxConnections = max;
                }
            }

            SettingsMap sm = new SettingsMap();
            sm.add(OperationalTextKey.MAX_CONNECTIONS, String.valueOf(maxConnections));
            conn.update(sm);
            taskBalancer.releaseConnection(conn);

            if (update > 0) {
                addConnections(update);
            } else {
                for (int i = -1; i >= update; i--) {
                    taskBalancer.getConnection().close();
                }
            }

        } catch (Exception e) {
            // DO Nothing
        }

    }
1242701
@Override
    public boolean returnConnection(Connection<CL> connection) {
        returnedCount.incrementAndGet();
        monitor.incConnectionReturned(host);

        ConnectionException ce = connection.getLastException();
        if (ce != null) {
            if (ce instanceof IsDeadConnectionException) {
                noteError(ce);
                internalCloseConnection(connection);
                return true;
            }
        }
        errorsSinceLastSuccess.set(0);

        // Still within the number of max active connection
        if (activeCount.get() <= config.getMaxConnsPerHost()) {
            availableConnections.add(connection);

            if (isShutdown()) {
                discardIdleConnections();
                return true;
            }
        }
        else {
            // maxConnsPerHost was reduced. This may end up closing too many
            // connections, but that's ok. We'll open them later.
            internalCloseConnection(connection);
            return true;
        }

        return false;
    }
1037006
public static GenericObjectPool<Integer> createConnectionPool(int maxConnections) {
        GenericObjectPool<Integer> connectionPool = new GenericObjectPool<Integer>(new ConnectionPoolObjectFactory());
        connectionPool.setMaxActive(maxConnections);
        connectionPool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_BLOCK);
        return connectionPool;
    }