Sets connection timeout.

@param stub The stub to set the property on
@param timeout the new timeout value in milliseconds
349741
public static void setTimeout(Stub stub, int timeout) {
        if (stub instanceof org.apache.axis.client.Stub) {
            ((org.apache.axis.client.Stub)stub).setTimeout(timeout);
        }
    }
346269
private RequestConfig setTimeout(Context context) {
        int socketTimeout = 0;
        int connectionTimeout = 0;
        if ( context.getCustomerRequestTimeout() != null) {
            socketTimeout = context.getCustomerRequestTimeout();
        }else {
            String reqTimeout = Config.getProperty(Config.TIMEOUT_REQUEST);
            if (StringUtils.hasText(reqTimeout)) {
                socketTimeout = new Integer(reqTimeout.trim());
            }
        }

        String connTimeout = Config.getProperty(Config.TIMEOUT_CONNECTION);
        if (StringUtils.hasText(connTimeout)) {
            connectionTimeout = new Integer(connTimeout.trim());
        }
        RequestConfig defaultRequestConfig = RequestConfig.custom()
                .setSocketTimeout(socketTimeout)
                .setConnectTimeout(connectionTimeout)
                .setConnectionRequestTimeout(connectionTimeout)
                .setCookieSpec(CookieSpecs.IGNORE_COOKIES)
                .build();
        return defaultRequestConfig;

    }
1233000
private void setLoginTimeout(final DataSource dataSource)
   {
      if (connectionTimeout != Integer.MAX_VALUE) {
         try {
            dataSource.setLoginTimeout(Math.max(1, (int) MILLISECONDS.toSeconds(500L + connectionTimeout)));
         }
         catch (Exception e) {
            logger.info("{} - Failed to set login timeout for data source. ({})", poolName, e.getMessage());
         }
      }
   }
1055751
public AndroidTerminateApplicationOptions withTimeout(Duration timeout) {
        checkArgument(!checkNotNull(timeout).isNegative(), "The timeout value cannot be negative");
        this.timeout = timeout;
        return this;
    }
411559
public static Timeout min(Timeout... timeouts)
	{
		Timeout min = null;

		for (Timeout timeout : timeouts)
		{
			if (timeout != null)
				if (min == null || min.getMilliseconds() > timeout.getMilliseconds())
					min = timeout;
		}

		if (min != null)
			return min;
		else
			throw new IllegalArgumentException("Must specify at least one non-null timeout!");
	}
1207674
public void setTimeout(int timeout) {
        if (config.delivery instanceof HttpDelivery) {
            ((HttpDelivery) config.delivery).setTimeout(timeout);
        }
        if (config.sessionDelivery instanceof HttpDelivery) {
            ((HttpDelivery) config.sessionDelivery).setTimeout(timeout);
        }
    }
1144692
public void setSoTimeout(int timeout) throws SocketException{
      super.setSoTimeout(timeout);
      if(!doing_direct) proxy.proxySocket.setSoTimeout(timeout);
   }
612247
public static Timeout max(Timeout... timeouts)
	{
		Timeout max = null;

		for (Timeout timeout : timeouts)
		{
			if (timeout != null)
				if (max == null || max.getMilliseconds() < timeout.getMilliseconds())
					max = timeout;
		}

		if (max != null)
			return max;
		else
			throw new IllegalArgumentException("Must specify at least one non-null timeout!");
	}
1211337
@Override
    public void setTimeOut(int timeout) throws IOException {
        isOpen();
        int ret = WDT.setTimeOut(fd, timeout);
        if(ret<0) {
            throw new IOException("Cannot set timeout for " + filename + " got " + ret + " back.");
        }
    }
861314
public void setDefaultTimeout(long timeout, TimeUnit unit) {
        this.timeout = timeout;
        this.unit    = unit;
        bootstrap.setOption("connectTimeoutMillis", unit.toMillis(timeout));
    }
605549
@Override
    public void setPeerRecoveryLeaseTimeout(int leaseTimeout)
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "setPeerRecoveryLeaseTimeout", leaseTimeout);

        // Store the Lease Timeout  
        _leaseTimeout = leaseTimeout;

        if (tc.isEntryEnabled())
            Tr.exit(tc, "setPeerRecoveryLeaseTimeout", this);

    }
1028387
def set_timeout(scope, timeout):
    
    conn = scope.get('__connection__')
    conn.set_timeout(int(timeout[0]))
    return True
399815
public static void setRequestProperties(final Properties props, HttpURLConnection conn, Integer timeout) {
        if (props != null) {
            if (props.get("User-Agent") == null) {
                conn.setRequestProperty("User-Agent", "Java");
            }

            for (Entry entry : props.entrySet()) {
                conn.setRequestProperty(String.valueOf(entry.getKey()), String.valueOf(entry.getValue()));
            }
        }

        if (timeout != null) {
            conn.setConnectTimeout(timeout * 1000);
        }

    }
610718
public void setReadTimeout(int readTimeout) {
		this.client = this.client.newBuilder()
				.readTimeout(readTimeout, TimeUnit.MILLISECONDS)
				.build();
	}
492241
def set_timeout(timeout)
      new_action = { 'SessionTimeoutMinutes' => timeout }
      response = rest_patch('/redfish/v1/Managers/1/NetworkService/', body: new_action)
      response_handler(response)
      true
    end
1246572
public void setSessionTimeout(Long timeout, TimeUnit unit) {
        long t = unit.toMillis(timeout);
        properties.put("request.timeout.ms", String.valueOf(t + 60000));
        properties.put("session.timeout.ms", String.valueOf(t));
    }
802913
def settimeout(self, timeout):
        
        self.sock_opt.timeout = timeout
        if self.sock:
            self.sock.settimeout(timeout)