.maxConnections(maxConnections) .connectionTimeout(connectionTimeout) .socketTimeout(socketTimeout) .username(username) .password(password)
httpClientBuilder.socketTimeout(20000);
httpClientBuilder.socketTimeout(20000);
httpClientBuilder.socketTimeout(20000);
@Override protected UsageAwareDatastoreConnection<CouchDbDataContext> createDatastoreConnection() { final StdHttpClient.Builder httpClient = new StdHttpClient.Builder(); httpClient.host(getHostname()); if (_port != null) { httpClient.port(_port); } if (_username != null) { httpClient.username(_username); } if (_password != null) { httpClient.password(_password); } httpClient.enableSSL(_sslEnabled); httpClient.connectionTimeout(HTTP_TIMEOUT); httpClient.socketTimeout(HTTP_TIMEOUT); final CouchDbDataContext dataContext; if (_tableDefs != null && _tableDefs.length > 0) { dataContext = new CouchDbDataContext(httpClient, _tableDefs); } else { dataContext = new CouchDbDataContext(httpClient); } return new UpdateableDatastoreConnectionImpl<>(dataContext, this); }
@Override protected UsageAwareDatastoreConnection<CouchDbDataContext> createDatastoreConnection() { final StdHttpClient.Builder httpClient = new StdHttpClient.Builder(); httpClient.host(getHostname()); if (_port != null) { httpClient.port(_port); } if (_username != null) { httpClient.username(_username); } if (_password != null) { httpClient.password(_password); } httpClient.enableSSL(_sslEnabled); httpClient.connectionTimeout(HTTP_TIMEOUT); httpClient.socketTimeout(HTTP_TIMEOUT); final CouchDbDataContext dataContext; if (_tableDefs != null && _tableDefs.length > 0) { dataContext = new CouchDbDataContext(httpClient, _tableDefs); } else { dataContext = new CouchDbDataContext(httpClient); } return new UpdateableDatastoreConnectionImpl<CouchDbDataContext>(dataContext, this); }