doanduyhai / Achilles

An advanced Java Object Mapper/Query DSL generator for Cassandra
http://achilles.archinnov.info
Apache License 2.0
241 stars 92 forks source link

embedded: server builder now supports setting protocol version #375

Closed hjizettle closed 3 years ago

hjizettle commented 3 years ago

If not supplied the ProtocolVersion.NEWEST_SUPPORTED will be used in order to maintain backwards compatibility.

Fixes: #374

doanduyhai commented 3 years ago

Achilles 6.1.0 is just released, it will be available soon on Maven central

doanduyhai commented 3 years ago

 CassandraEmbeddedServerBuilder
        .builder()
        .withConnectionProtocol(ProtocolVersion.V4)    
         ...
        .buildNativeSession() || buildNativeCluster() || buildServer();
        @Rule
    public AchillesTestResource<ManagerFactory> resource =  AchillesTestResourceBuilder
        .forJunit()
        .withProtocolVersion(ProtocolVersion.V4)
        .
        ...
        .build((cluster, statementsCache) -> ManagerFactoryBuilder
            .builder(cluster)
            .doForceSchemaCreation(true)
            .withStatementCache(statementsCache) //MANDATORY
            .withDefaultKeyspaceName("achilles_embedded")
            .build()
        );