Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

smoketurner/dropwizard-riak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Nov 29, 2019
f3e30b1 · Nov 29, 2019
May 23, 2019
Nov 25, 2018
Jan 21, 2019
Nov 17, 2017
Apr 1, 2016
Nov 25, 2018
Oct 5, 2018
Jun 28, 2018
Oct 7, 2018
Jan 21, 2019
Aug 22, 2018
Aug 22, 2018
Nov 29, 2019
Jan 21, 2019

Repository files navigation

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.7-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.