Example usage for com.amazonaws ClientConfiguration setConnectionTTL

List of usage examples for com.amazonaws ClientConfiguration setConnectionTTL

Introduction

In this page you can find the example usage for com.amazonaws ClientConfiguration setConnectionTTL.

Prototype

public void setConnectionTTL(long connectionTTL) 

Source Link

Document

Sets the expiration time (in milliseconds) for a connection in the connection pool.

Usage

From source file:com.amazon.kinesis.streaming.agent.AgentContext.java

License:Open Source License

public ClientConfiguration getAwsClientConfiguration() {
    ClientConfiguration config = new ClientConfiguration();
    config.setUserAgent(userAgent(config));
    config.setMaxConnections(maxConnections());
    config.setConnectionTimeout(connectionTimeoutMillis());
    config.setSocketTimeout(socketTimeoutMillis());
    config.setUseTcpKeepAlive(useTcpKeepAlive());
    config.setConnectionTTL(connectionTTLMillis());
    config.setUseGzip(useHttpGzip());// ww  w.  jav a  2s.  c o m
    return config;
}