Java Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.mvn/wrapper
src Use dropwizard-pom Jun 28, 2018
.editorconfig Various build cleanups Nov 17, 2017
.gitignore Initial commit Apr 1, 2016
.travis.yml Use dropwizard-pom Jun 28, 2018
.travis_after_success.sh Remove coverage reporting Jul 14, 2018
LICENSE Use dropwizard-pom Jun 28, 2018
README.md Remove coverage reporting Jul 14, 2018
maven_deploy_settings.xml Use dropwizard-pom Jun 28, 2018
mvnw Various build cleanups Nov 17, 2017
mvnw.cmd Various build cleanups Nov 17, 2017
pom.xml

README.md

Dropwizard Riak

Build Status Maven Central GitHub license Become a Patron

A bundle for accessing Riak in Dropwizard applications using riak-java-client.

Usage

Within your Configuration class, add the following:

@Valid
@NotNull
private final RiakFactory riak = new RiakFactory();

@JsonProperty
public RiakFactory getRiakFactory() {
    return riak;
}

Then with your Application class, you can access a RiakClient by doing the following:

@Override
public void initialize(Bootstrap<MyConfiguration> bootstrap) {
    bootstrap.addBundle(new RiakBundle<MyConfiguration>() {
        @Override
        public RiakFactory getRiakFactory(MyConfiguration configuration) {
            return configuration.getRiakFactory();
        }
    });
}

@Override
public void run(MyConfiguration configuration, Environment environment) throws Exception {
    RiakClient client = configuration.getRiakFactory().build();
}

Maven Artifacts

This project is available on Maven Central. To add it to your project simply add the following dependencies to your pom.xml:

<dependency>
    <groupId>com.smoketurner.dropwizard</groupId>
    <artifactId>dropwizard-riak</artifactId>
    <version>1.3.0-1</version>
</dependency>

Support

Please file bug reports and feature requests in GitHub issues.

License

Copyright (c) 2018 Smoke Turner, LLC

This library is licensed under the Apache License, Version 2.0.

See http://www.apache.org/licenses/LICENSE-2.0.html or the LICENSE file in this repository for the full license text.