private SocketOptions getSocketOptions(Properties connectionProperties)
    {
        // SocketOptions
        SocketOptions socketConfig = new SocketOptions();

        String connectTimeoutMillis = connectionProperties.getProperty(CassandraConstants.SOCKET_TIMEOUT);
        String readTimeoutMillis = connectionProperties.getProperty("readTimeoutMillis");
        String keepAlive = connectionProperties.getProperty("keepAlive");
        String reuseAddress = connectionProperties.getProperty("reuseAddress");
        String soLinger = connectionProperties.getProperty("soLinger");
        String tcpNoDelay = connectionProperties.getProperty("tcpNoDelay");
        String receiveBufferSize = connectionProperties.getProperty("receiveBufferSize");
        String sendBufferSize = connectionProperties.getProperty("sendBufferSize");

        if (!StringUtils.isBlank(connectTimeoutMillis))
        {
            socketConfig.setConnectTimeoutMillis(new Integer(connectTimeoutMillis));
        }

        if (!StringUtils.isBlank(readTimeoutMillis))
        {
            socketConfig.setReadTimeoutMillis(new Integer(readTimeoutMillis));
        }

        if (!StringUtils.isBlank(keepAlive))
        {
            socketConfig.setKeepAlive(new Boolean(keepAlive));
        }

        if (!StringUtils.isBlank(reuseAddress))
        {
            socketConfig.setReuseAddress(new Boolean(reuseAddress));
        }

        if (!StringUtils.isBlank(soLinger))
        {
            socketConfig.setSoLinger(new Integer(soLinger));
        }

        if (!StringUtils.isBlank(tcpNoDelay))
        {
            socketConfig.setTcpNoDelay(new Boolean(tcpNoDelay));
        }

        if (!StringUtils.isBlank(receiveBufferSize))
        {
            socketConfig.setReceiveBufferSize(new Integer(receiveBufferSize));
        }

        if (!StringUtils.isBlank(sendBufferSize))
        {
            socketConfig.setSendBufferSize(new Integer(sendBufferSize));
        }

        return socketConfig;
    }
private SocketOptions getSocketOptions ( Properties connectionProperties ) { SocketOptions socketConfig = new SocketOptions ( ) ; String connectTimeoutMillis = connectionProperties . getProperty ( CassandraConstants . SOCKET_TIMEOUT ) ; String readTimeoutMillis = connectionProperties . getProperty ( "readTimeoutMillis" ) ; String keepAlive = connectionProperties . getProperty ( "keepAlive" ) ; String reuseAddress = connectionProperties . getProperty ( "reuseAddress" ) ; String soLinger = connectionProperties . getProperty ( "soLinger" ) ; String tcpNoDelay = connectionProperties . getProperty ( "tcpNoDelay" ) ; String receiveBufferSize = connectionProperties . getProperty ( "receiveBufferSize" ) ; String sendBufferSize = connectionProperties . getProperty ( "sendBufferSize" ) ; if ( ! StringUtils . isBlank ( connectTimeoutMillis ) ) { socketConfig . setConnectTimeoutMillis ( new Integer ( connectTimeoutMillis ) ) ; } if ( ! StringUtils . isBlank ( readTimeoutMillis ) ) { socketConfig . setReadTimeoutMillis ( new Integer ( readTimeoutMillis ) ) ; } if ( ! StringUtils . isBlank ( keepAlive ) ) { socketConfig . setKeepAlive ( new Boolean ( keepAlive ) ) ; } if ( ! StringUtils . isBlank ( reuseAddress ) ) { socketConfig . setReuseAddress ( new Boolean ( reuseAddress ) ) ; } if ( ! StringUtils . isBlank ( soLinger ) ) { socketConfig . setSoLinger ( new Integer ( soLinger ) ) ; } if ( ! StringUtils . isBlank ( tcpNoDelay ) ) { socketConfig . setTcpNoDelay ( new Boolean ( tcpNoDelay ) ) ; } if ( ! StringUtils . isBlank ( receiveBufferSize ) ) { socketConfig . setReceiveBufferSize ( new Integer ( receiveBufferSize ) ) ; } if ( ! StringUtils . isBlank ( sendBufferSize ) ) { socketConfig . setSendBufferSize ( new Integer ( sendBufferSize ) ) ; } return socketConfig ; }
Gets the socket options.

@param connectionProperties
the connection properties
@return the socket options