All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.dropwizard.cassandra.protocolVersion.DseProtocolVersionFactory Maven / Gradle / Ivy

Go to download

Provides easy integration for Dropwizard applications with Apache Cassandra using the DataStax 4.x client

There is a newer version: 4.0.0
Show newest version
package io.dropwizard.cassandra.protocolVersion;

import com.datastax.dse.driver.api.core.DseProtocolVersion;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
import com.fasterxml.jackson.annotation.JsonTypeName;
import io.dropwizard.cassandra.DropwizardProgrammaticDriverConfigLoaderBuilder;

@JsonTypeName("dse")
public class DseProtocolVersionFactory implements ProtocolVersionFactory {
    private DseProtocolVersion version;

    public DseProtocolVersion getVersion() {
        return version;
    }

    public void setVersion(DseProtocolVersion version) {
        this.version = version;
    }

    @Override
    public void accept(DropwizardProgrammaticDriverConfigLoaderBuilder configLoaderBuilder) {
        configLoaderBuilder.withNullSafeString(DefaultDriverOption.PROTOCOL_VERSION, version.name());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy