congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
HttpConfig.getMaxConnectionsPerHost
Code IndexAdd Tabnine to your IDE (free)

How to use
getMaxConnectionsPerHost
method
in
com.hubspot.horizon.HttpConfig

Best Java code snippets using com.hubspot.horizon.HttpConfig.getMaxConnectionsPerHost (Showing top 2 results out of 315)

origin: com.hubspot/HorizonApache

private HttpClientConnectionManager createConnectionManager(HttpConfig config) {
 Registry<ConnectionSocketFactory> registry = createSocketFactoryRegistry(config);
 PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry);
 connectionManager.setMaxTotal(config.getMaxConnections());
 connectionManager.setDefaultMaxPerRoute(config.getMaxConnectionsPerHost());
 return connectionManager;
}
origin: com.hubspot/HorizonNing

public NingAsyncHttpClient(HttpConfig config) {
 Preconditions.checkNotNull(config);
 NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig();
 int workerThreads = Math.min(Runtime.getRuntime().availableProcessors(), 4);
 this.workerExecutorService = newWorkerThreadPool(workerThreads);
 this.channelFactory = newSocketChannelFactory(this.workerExecutorService, workerThreads);
 nettyConfig.setSocketChannelFactory(this.channelFactory);
 nettyConfig.setNettyTimer(TIMER);
 AsyncHttpClientConfig ningConfig = new AsyncHttpClientConfig.Builder()
     .addRequestFilter(new ThrottleRequestFilter(config.getMaxConnections()))
     .addRequestFilter(new AcceptEncodingRequestFilter())
     .setMaxConnectionsPerHost(config.getMaxConnectionsPerHost())
     .setConnectTimeout(config.getConnectTimeoutMillis())
     .setRequestTimeout(config.getRequestTimeoutMillis())
     .setReadTimeout(config.getRequestTimeoutMillis())
     .setMaxRedirects(config.getMaxRedirects())
     .setFollowRedirect(config.isFollowRedirects())
     .setHostnameVerifier(new NingHostnameVerifier(config.getSSLConfig()))
     .setSSLContext(NingSSLContext.forConfig(config.getSSLConfig()))
     .setAsyncHttpClientProviderConfig(nettyConfig)
     .setUserAgent(config.getUserAgent())
     .setIOThreadMultiplier(1)
     .build();
 this.ningClient = new com.ning.http.client.AsyncHttpClient(ningConfig);
 this.requestConverter = new NingHttpRequestConverter(config.getObjectMapper());
 this.defaultOptions = config.getOptions();
 this.mapper = config.getObjectMapper();
}
com.hubspot.horizonHttpConfiggetMaxConnectionsPerHost

Popular methods of HttpConfig

  • newBuilder
  • getConnectTimeoutMillis
  • getMaxConnections
  • getMaxRedirects
  • getObjectMapper
  • getOptions
  • getRequestTimeoutMillis
  • getSSLConfig
  • getUserAgent
  • isFollowRedirects
  • <init>
  • getDefaultKeepAliveMillis
  • <init>,
  • getDefaultKeepAliveMillis,
  • isRejectRelativeRedirects

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Collectors (java.util.stream)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now