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

com.lordofthejars.nosqlunit.couchbase.CouchbaseConfiguration Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.lordofthejars.nosqlunit.couchbase;

import com.couchbase.client.CouchbaseClient;
import com.lordofthejars.nosqlunit.core.AbstractJsr330Configuration;

import java.io.IOException;
import java.net.URI;
import java.util.List;

public class CouchbaseConfiguration extends AbstractJsr330Configuration {

    private final List urlList;

    private final String bucketPassword;

    private final String bucketName;

    private CouchbaseClient client;

    public CouchbaseConfiguration(final List urlList, final String bucketPassword, final String bucketName) {
        this.urlList = urlList;
        this.bucketPassword = bucketPassword;
        this.bucketName = bucketName;
        try {
            client = new CouchbaseClient(urlList, bucketName, bucketPassword);
        } catch (IOException e) {
            throw new IllegalArgumentException(e);
        }
    }

    public List getUrlList() {
        return urlList;
    }

    public String getBucketPassword() {
        return bucketPassword;
    }

    public String getBucketName() {
        return bucketName;
    }

    public CouchbaseClient getClient() {
        return client;
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy