Tutorial by Examples

Add the following dependency to your pom.xml file: <dependency> <groupId>com.couchbase.client</groupId> <artifactId>java-client</artifactId> <version>2.3.1</version> </dependency> You can check the maven repository for the latest version....
String bucketName = "default"; String bucketPassword = ""; List<String> nodes = Arrays.asList("127.0.0.1"); // IP or hostname of one or more nodes in the cluster Cluster cluster = CouchbaseCluster.create(nodes); Bucket bucket = cluster.openBucket(bucketName,...
String bucketName = "bucket"; List<String> nodes = Arrays.asList("node1","node2"); // IP or hostname of one or more nodes in the cluster Cluster cluster = CouchbaseCluster.create(nodes); Bucket bucket = cluster.openBucket(bucketName); //check for a documen...
TTL value can be used to decide for how long the document needs to be there in the bucket. By default TTL value is 0, which means it will be there for indefinite time period. String bucketName = "bucket"; List<String> nodes = Arrays.asList("node1","node2"); // I...

Page 1 of 1