Over a million developers have joined DZone.

Couchbase Java SDK 2.0.0 Beta 1

DZone's Guide to

Couchbase Java SDK 2.0.0 Beta 1

· Java Zone ·
Free Resource

Download the Altoros NoSQL Performance Benchmark 2018. Compare top NoSQL solutions – Couchbase Server v5.5, MongoDB v3.6, and DataStax Enterprise v6 (Cassandra).

Originally written by Michael Nitschinger

On behalf of the whole SDK team I'm happy to announce the first beta release of the Java/JVM SDK release train nicknamed Armstrong. It contains both the JVM core package "core-io" 1.0.0-beta as well as the Java SDK 2.0.0-beta.

This beta release marks a milestone in that we're now locking down the API, only breaking them if absolutely necessary before the GA release. Also, we are releasing the first batch of documentation, which can be found here and also API docs which you can find here.

This blog covers the new-for-beta highlights.  For a more conversational introduction to what's new in 2.0 in general, have a look at my blogs on the earlier developer preview releases: DP1, DP2, DP3 and the blog on Why Couchbase Chose RxJava.

Here is how you can get it:


        <name>couchbase repo</name>

Lots of APIs have been added, bugs have been ironed out and other components have been simplified. Here are the highlights:

Cluster-Level Management APIs

APIs have been added to allow the creation, deletion and retrieval of bucket information:

// Create the cluster reference
Cluster cluster = CouchbaseCluster.create();

// Connect the Cluster Manager
ClusterManager manager = cluster.clusterManager("Administrator", "password").toBlocking().single();

// Lists all configured buckets with their settings.
Observable<BucketSettings> buckets = manager.getBuckets();

// Removes the beer-sample bucket
Observable<Boolean> success = manager.removeBucket("beer-sample");

// Creates a new bucket
Observable<BucketSettings> inserted = manager.insertBucket(DefaultBucketSettings

Bucket-Level Management APIs

In additon to cluster-level APIs, also bucket level information can now be retrieved:

// Create the cluster reference
Cluster cluster = CouchbaseCluster.create();
// Open the bucket
Bucket bucket = cluster.openBucket().toBlocking().single();

// Open the bucket manager
BucketManager manager = bucket.bucketManager().toBlocking().single();

// Flush the bucket
Observable<Boolean> flush = manager.flush();

// Grab info
BucketInfo info = manager.info().toBlocking().single();

Simplified Environment

The Environment API has been simplified and the properties, which were exposed in dp3 have been collapsed into the Environment itself. Customizing it now got even simpler:

// No more properties needed
CouchbaseEnvironment env = DefaultCouchbaseEnvironment.builder()

Cluster cluster = CouchbaseCluster.create(env);

Next Steps

This release brings us very close to a GA release in the next weeks. We are now shifting all focus onto stability and documentation, hopefully making this the best database SDK on the JVM out there. Please kick the tires on this beta release as much as you can, report any issues so we can resolve them in a timely manner.

Download the whitepaper, Moving From Relational to NoSQL: How to Get Started. We’ll take you step by step through your first NoSQL project.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}