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

smoketurner/dropwizard-riak

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.