Search in sources :

Example 1 with CassandraClusterConfig

use of org.springframework.cloud.service.column.CassandraClusterConfig in project spring-cloud-connectors by spring-cloud.

the class CassandraClusterConfigWithServiceConfig method testClusterFactoryWithConfig.

@Bean(name = "my-service")
public Cluster testClusterFactoryWithConfig() {
    CassandraClusterConfig config = new CassandraClusterConfig();
    SocketOptions socketOptions = new SocketOptions();
    socketOptions.setSendBufferSize(12345);
    config.setSocketOptions(socketOptions);
    return connectionFactory().cluster("my-service", config);
}
Also used : CassandraClusterConfig(org.springframework.cloud.service.column.CassandraClusterConfig) SocketOptions(com.datastax.driver.core.SocketOptions) Bean(org.springframework.context.annotation.Bean)

Aggregations

SocketOptions (com.datastax.driver.core.SocketOptions)1 CassandraClusterConfig (org.springframework.cloud.service.column.CassandraClusterConfig)1 Bean (org.springframework.context.annotation.Bean)1