Understanding Java SDK
We discussed the various APIs provided by the Couchbase SDK for connecting to the Couchbase server and performing operations on it. Let's now try to focus on the APIs specific to Java. We are going to explain Java SDK 2.1.3. If you are a seasoned software developer, you might have some ideas about what are required to perform operations on the database system. We need to know the hostname or the IP address of the servers that run the Couchbase database. Of course, you need the database name, which is the bucket in the Couchbase system, to connect to it before performing any operations:
Cluster cluster = CouchbaseCluster.create(); Bucket defaultBucket = cluster.openBucket();
The preceding statements create a Cluster object ...
Get Learning Couchbase now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.