Java Code Examples for io.dropwizard.client.HttpClientConfiguration#setKeepAlive()
The following examples show how to use
io.dropwizard.client.HttpClientConfiguration#setKeepAlive() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HadoopDataStoreManager.java From emodb with Apache License 2.0 | 5 votes |
/** * Creates a ServiceFactory for a cluster with reasonable configurations. */ private MultiThreadedServiceFactory<AuthDataStore> createDataStoreServiceFactory(String cluster, MetricRegistry metricRegistry) { HttpClientConfiguration clientConfig = new HttpClientConfiguration(); clientConfig.setKeepAlive(Duration.seconds(1)); clientConfig.setConnectionTimeout(Duration.seconds(10)); clientConfig.setTimeout(Duration.minutes(5)); return DataStoreClientFactory.forClusterAndHttpConfiguration(cluster, clientConfig, metricRegistry); }
Example 2
Source File: BlobStoreClientFactory.java From emodb with Apache License 2.0 | 4 votes |
public static BlobStoreClientFactory forCluster(String clusterName, MetricRegistry metricRegistry) { HttpClientConfiguration httpClientConfiguration = new HttpClientConfiguration(); httpClientConfiguration.setKeepAlive(Duration.seconds(1)); return new BlobStoreClientFactory(clusterName, createDefaultJerseyClient(httpClientConfiguration, metricRegistry, getServiceName(clusterName))); }
Example 3
Source File: UserAccessControlClientFactory.java From emodb with Apache License 2.0 | 4 votes |
public static UserAccessControlClientFactory forCluster(String clusterName, MetricRegistry metricRegistry) { HttpClientConfiguration httpClientConfiguration = new HttpClientConfiguration(); httpClientConfiguration.setKeepAlive(Duration.seconds(1)); return new UserAccessControlClientFactory(clusterName, createDefaultJerseyClient(httpClientConfiguration, getServiceName(clusterName), metricRegistry)); }
Example 4
Source File: DataStoreClientFactory.java From emodb with Apache License 2.0 | 4 votes |
public static DataStoreClientFactory forCluster(String clusterName, MetricRegistry metricRegistry) { HttpClientConfiguration httpClientConfiguration = new HttpClientConfiguration(); httpClientConfiguration.setKeepAlive(Duration.seconds(1)); return new DataStoreClientFactory(clusterName, createDefaultJerseyClient(httpClientConfiguration, getServiceName(clusterName), metricRegistry)); }
Example 5
Source File: QueueClientFactory.java From emodb with Apache License 2.0 | 4 votes |
public static QueueClientFactory forCluster(String clusterName, MetricRegistry metricRegistry) { HttpClientConfiguration httpClientConfiguration = new HttpClientConfiguration(); httpClientConfiguration.setKeepAlive(Duration.seconds(1)); return new QueueClientFactory(clusterName, createDefaultJerseyClient(httpClientConfiguration, getServiceName(clusterName), metricRegistry)); }
Example 6
Source File: DedupQueueClientFactory.java From emodb with Apache License 2.0 | 4 votes |
public static DedupQueueClientFactory forCluster(String clusterName, MetricRegistry metricRegistry) { HttpClientConfiguration httpClientConfiguration = new HttpClientConfiguration(); httpClientConfiguration.setKeepAlive(Duration.seconds(1)); return new DedupQueueClientFactory(clusterName, createDefaultJerseyClient(httpClientConfiguration, getServiceName(clusterName), metricRegistry)); }
Example 7
Source File: DatabusClientFactory.java From emodb with Apache License 2.0 | 4 votes |
public static DatabusClientFactory forCluster(String clusterName, MetricRegistry metricRegistry) { HttpClientConfiguration httpClientConfiguration = new HttpClientConfiguration(); httpClientConfiguration.setKeepAlive(Duration.seconds(1)); return new DatabusClientFactory(clusterName, createDefaultJerseyClient(httpClientConfiguration, metricRegistry, getServiceName(clusterName))); }