Created
December 11, 2013 17:28
-
-
Save ludo1026/7914756 to your computer and use it in GitHub Desktop.
Tutorial Couchbase : connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.tuto.couchbase; | |
import com.couchbase.client.CouchbaseClient; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class CouchbaseConnection { | |
public static CouchbaseClient newCouchbaseClient() throws Exception { | |
List<URI> uris = new ArrayList<URI>(); | |
uris.add(new URI("http://127.0.0.1:8091/pools")); | |
String bucketName = "default"; | |
String pwd = ""; | |
// Connection | |
CouchbaseClient client = new CouchbaseClient(uris, bucketName, pwd); | |
return client; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment