DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Java
  4. Couchbase Java SDK 2.0.0 Beta 1
Content provided by Couchbase logo

Couchbase Java SDK 2.0.0 Beta 1

Don Pinto user avatar by
Don Pinto
·
Aug. 26, 14 · Interview
Like (0)
Save
Tweet
Share
4.44K Views

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:

<dependencies>
    <dependency>
        <groupId>com.couchbase.client</groupId>
        <artifactId>couchbase-client</artifactId>
        <version>2.0.0-beta</version>
    </dependency>
</dependencies>

<repositories>
    <repository>
        <id>couchbase</id>
        <name>couchbase repo</name>
        <url>http://files.couchbase.com/maven2</url>
        <snapshots><enabled>false</enabled></snapshots>
    </repository>
</repositories>

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
    .builder()
    .name("mybucket")
    .quota(512)
    .password("password")
    .enableFlush(true)
    .build());

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()
    .queryEnabled(true)
    .build();

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.


Comments

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: