Example usage for com.amazonaws ClientConfiguration withSocketBufferSizeHints

List of usage examples for com.amazonaws ClientConfiguration withSocketBufferSizeHints

Introduction

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

Prototype

public ClientConfiguration withSocketBufferSizeHints(int socketSendBufferSizeHint,
        int socketReceiveBufferSizeHint) 

Source Link

Document

Sets the optional size hints (in bytes) for the low level TCP send and receive buffers, and returns the updated ClientConfiguration object so that additional method calls may be chained together.

Usage

From source file:io.fineo.drill.exec.store.dynamo.config.ClientProperties.java

License:Apache License

@JsonIgnore
public ClientConfiguration getConfiguration() {
    ClientConfiguration clientConfig = new ClientConfiguration();
    if (connectionTimeout > 0) {
        clientConfig.withClientExecutionTimeout(connectionTimeout);
    }//from   ww w  . j a  v  a2s  . c  om
    if (maxConnections > 0) {
        clientConfig.withMaxConnections(maxConnections);
    }
    if (maxErrorRetry > 0) {
        clientConfig.withMaxErrorRetry(maxErrorRetry);
    }
    if (socketTimeout > 0) {
        clientConfig.withSocketTimeout(socketTimeout);
    }
    clientConfig.withSocketBufferSizeHints(socketSendBufferHint, socketReceiveBufferHint);
    if (withGzip != null) {
        clientConfig.setUseGzip(withGzip.booleanValue());
    }
    if (withReaper != null) {
        clientConfig.setUseReaper(withReaper.booleanValue());
    }

    return clientConfig;
}