Package com.netflix.astyanax.connectionpool.impl

Examples of com.netflix.astyanax.connectionpool.impl.ConnectionPoolConfigurationImpl


    .withAstyanaxConfiguration(
        new AstyanaxConfigurationImpl()
        .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
        .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE))
        .withConnectionPoolConfiguration(
            new ConnectionPoolConfigurationImpl(TEST_CLUSTER_NAME
                + "_" + TEST_KEYSPACE_NAME)
            .setSocketTimeout(30000)
            .setMaxTimeoutWhenExhausted(2000)
            .setMaxConnsPerHost(20)
            .setInitConnsPerHost(10)
View Full Code Here


    .withAstyanaxConfiguration(
        new AstyanaxConfigurationImpl()
        .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
        .setConnectionPoolType(ConnectionPoolType.ROUND_ROBIN))
        .withConnectionPoolConfiguration(
            new ConnectionPoolConfigurationImpl(TEST_CLUSTER_NAME
                + "_" + TEST_KEYSPACE_NAME)
            .setSocketTimeout(30000)
            .setMaxTimeoutWhenExhausted(2000)
            .setMaxConnsPerHost(20)
            .setInitConnsPerHost(10)
View Full Code Here

    private AstyanaxContext<Keyspace> getKeyspaceContext(final String ks, final String seedHost) {
        AstyanaxContext<Keyspace> ctx =
                new AstyanaxContext.Builder()
        .forKeyspace(ks)
        .withConnectionPoolConfiguration(
                new ConnectionPoolConfigurationImpl("myCPConfig-" + ks)
                .setSeeds(seedHost)
                .setPort(7102))
                .withAstyanaxConfiguration(
                        new AstyanaxConfigurationImpl()
                        .setDefaultReadConsistencyLevel(ConsistencyLevel.CL_LOCAL_QUORUM)
View Full Code Here

                new AstyanaxConfigurationImpl()
                .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
                .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)
                .setDiscoveryDelayInSeconds(60000))
                .withConnectionPoolConfiguration(
                new ConnectionPoolConfigurationImpl(TEST_CLUSTER_NAME
                + "_" + TEST_KEYSPACE_NAME)
                .setSocketTimeout(30000)
                .setMaxTimeoutWhenExhausted(2000)
                .setMaxConnsPerHost(20)
                .setInitConnsPerHost(10)
View Full Code Here

                        new AstyanaxConfigurationImpl()
                                .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
                                .setConnectionPoolType(ConnectionPoolType.ROUND_ROBIN)
                                .setDiscoveryDelayInSeconds(60000))
                .withConnectionPoolConfiguration(
                        new ConnectionPoolConfigurationImpl(TEST_CLUSTER_NAME
                                + "_" + TEST_KEYSPACE_NAME)
                                .setSocketTimeout(30000)
                                .setMaxTimeoutWhenExhausted(2000)
                                .setMaxConnsPerHost(20)
                                .setInitConnsPerHost(10)
View Full Code Here

    .forCluster("Test Cluster")
    .forKeyspace("test1")
    .withAstyanaxConfiguration(new AstyanaxConfigurationImpl()     
        .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
    )
    .withConnectionPoolConfiguration(new ConnectionPoolConfigurationImpl("MyConnectionPool")
        .setPort(9160)
        .setMaxConnsPerHost(1)
        .setSeeds("127.0.0.1:9160")
    )
    .withAstyanaxConfiguration(new AstyanaxConfigurationImpl()     
View Full Code Here

    .forCluster("Test Cluster")
    .forKeyspace("test1")
    .withAstyanaxConfiguration(new AstyanaxConfigurationImpl()     
        .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
    )
    .withConnectionPoolConfiguration(new ConnectionPoolConfigurationImpl("MyConnectionPool")
        .setPort(9160)
        .setMaxConnsPerHost(1)
        .setSeeds("127.0.0.1:9160")
    )
    .withAstyanaxConfiguration(new AstyanaxConfigurationImpl()     
View Full Code Here

                                        ConnectionPoolType.TOKEN_AWARE)
                                .setDiscoveryDelayInSeconds(60000)
                                .setTargetCassandraVersion("1.2")
                                .setCqlVersion("3.0.0"))
                .withConnectionPoolConfiguration(
                        new ConnectionPoolConfigurationImpl(TEST_CLUSTER_NAME
                                + "_" + TEST_KEYSPACE_NAME)
                                .setSocketTimeout(30000)
                                .setMaxTimeoutWhenExhausted(2000)
                                .setMaxConnsPerHost(10).setInitConnsPerHost(10)
                                .setSeeds(SEEDS))
View Full Code Here

    /**
     * @param args
     */
    public static void main(String[] args) {
        ConnectionPoolConfigurationImpl config;
        config = new ConnectionPoolConfigurationImpl(TestConstants.CLUSTER_NAME
                + "_" + TestConstants.KEYSPACE_NAME);
//        config.setMaxConns(100);
        config.setMaxFailoverCount(-1);
        config.setMaxTimeoutWhenExhausted(1000);
        config.setMaxConnsPerHost(25);
        config.setInitConnsPerHost(0);
        config.setTimeoutWindow(5000);
        config.setMaxTimeoutCount(10);
        config.setRetrySuspendWindow(5000);
        config.setLatencyScoreStrategy(new EmaLatencyScoreStrategyImpl(1000, 0, 20));
        // config.setRetryBackoffStrategy(new
        // ExponentialRetryBackoffStrategy(20, 1000, 2000));

        final ConnectionPoolMonitor monitor   = new CountingConnectionPoolMonitor();
        TestConnectionFactory factory         = new TestConnectionFactory(config, monitor);
View Full Code Here

                        new AstyanaxConfigurationImpl()
                                .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
                                .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)
                                .setDiscoveryDelayInSeconds(60000))
                .withConnectionPoolConfiguration(
                        new ConnectionPoolConfigurationImpl(TEST_CLUSTER_NAME
                                + "_" + TEST_KEYSPACE_NAME)
                                .setSocketTimeout(30000)
                                .setMaxTimeoutWhenExhausted(2000)
                                .setMaxConnsPerHost(20)
                                .setInitConnsPerHost(10)
View Full Code Here

TOP

Related Classes of com.netflix.astyanax.connectionpool.impl.ConnectionPoolConfigurationImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.