Skip to content

Instantly share code, notes, and snippets.

@ludo1026
Created December 11, 2013 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ludo1026/7914756 to your computer and use it in GitHub Desktop.
Save ludo1026/7914756 to your computer and use it in GitHub Desktop.
Tutorial Couchbase : connection
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