{"id":1924,"date":"2015-04-30T08:02:50","date_gmt":"2015-04-30T08:02:50","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=1924"},"modified":"2025-10-09T07:18:47","modified_gmt":"2025-10-09T14:18:47","slug":"javasdk-2-2-dp","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/","title":{"rendered":"Couchbase Java SDK 2.2 Developer Preview 1"},"content":{"rendered":"<p>On behalf of the SDK Team, it is my pleasure to introduce the next big release for the Java SDK, the <strong>2.2 version<\/strong>. The team has been working hard to bring you new awesome features, and today we think it&#8217;s time to shed some light on them by releasing a first developer preview.<\/p>\n<p>2.2 brings a host of new features:<\/p>\n<ul>\n<li>Improved <a href=\"#n1ql\">N1QL<\/a> support<\/li>\n<li>Simple <a href=\"#odm\">Entity Mapping<\/a><\/li>\n<li>Various API <a href=\"#enhancement\">enhancements<\/a><\/li>\n<li>Helper classes for simplified <a href=\"#retry\">retry<\/a> handling<\/li>\n<li>Version bumps of <a href=\"#dependencies\">some dependencies<\/a><\/li>\n<\/ul>\n<p>Jump to the <a href=\"#conclusion\">conclusion<\/a> if you can&#8217;t wait to get your hands on the code :)<\/p>\n<h2>N1QL-related changes<a id=\"n1ql\"><\/a><\/h2>\n<p>Recently, Couchbase Server v4.0 Developer Preview was released. Among the many features of this new version, the integration of our new query language &#8220;SQL for Documents&#8221; (codenamed <code>N1QL<\/code>) is a major one.<\/p>\n<p>In previous versions of the Java SDK, we already had support for N1QL (especially for the 4th separate Developer Preview that was released by the Query Team earlier this year), and we continued in this way.<\/p>\n<p>Since N1QL DP4, we&#8217;ve <strong>extended the DSL<\/strong>, added a DSL for <strong>index management<\/strong> and added <strong>bucket password support<\/strong>.<\/p>\n<h3>DSL Extension<\/h3>\n<p>Various parts of the DSL have been extended and improved. We&#8217;ve made it so the whole <a href=\"https:\/\/query.pub.couchbase.com\/tutorial\/\">N1QL Tutorial<\/a> can be implemented through the Java DSL.<\/p>\n<p>The <code>FROM<\/code> clause can refer to Document IDs via the <code>USE KEYS<\/code> clause, while other clauses (like <code>JOIN<\/code> or <code>NEST<\/code>) on the other hand refer to Document IDs via <code>ON KEYS<\/code> clause.<br \/>\nThe existing DSL for that was just producing <code>KEYS<\/code> keyword, which is not enough, so both variants were re-implemented as <code>useKeys<\/code>\/<code>useKeysValues<\/code> and <code>onKeys<\/code>\/<code>onKeysValues<\/code> in the DSL.<\/p>\n<p>In N1QL, we have the concept of collection predicates (or comprehensions) with the ANY, EVERY, ARRAY and FIRST operators. We&#8217;ve introduced a mini-DSL, <code>Collections<\/code>, to build such predicates and produce an <code>Expression<\/code> that represents them, to be used in the rest of the DSL.<\/p>\n<p>In some cases, N1QL offers syntax alternatives and defaults. Three of them come to mind as we&#8217;ve tackled both a bit differently:<\/p>\n<ul>\n<li>the <code>AS<\/code> aliasing syntax can sometimes omit the keyword altogether, like in <code>FROM default AS src<\/code> vs <code>FROM default src<\/code>. We elected to only produce the explicit form with the <code>AS<\/code> keyword (since the user has to call the <code>as(String alias)<\/code> method anyway).<\/li>\n<li><code>USE KEYS<\/code> and <code>ON KEYS<\/code> have optional alternative syntax <code>USER PRIMARY KEYS<\/code> and <code>ON PRIMARY KEYS<\/code>. These are semanticaly equivalent and we only produce the first form.<\/li>\n<li><code>ORDER BY<\/code> has a default ordering direction where one doesn&#8217;t explicitely ask for <code>DESC<\/code> nor <code>ASC<\/code>. We&#8217;ve implemented this option in the <code>Sort<\/code> operator with the <code>def(Expression onWhatToSort)<\/code> method.<\/li>\n<\/ul>\n<p>A few functions, some of which were previously implemented in the <code>Functions<\/code> class, have been added\/moved to the <code>...query.dsl.functions<\/code> package, in separate helper classes that match the category of the functions inside (eg. <code>StringFunctions<\/code>).<\/p>\n<p>In <code>Expression<\/code>, we added a few factory methods to construct Expressions from a <code>Statement<\/code> (like doing a sub-query) and constructing a <code>path<\/code>:<\/p>\n<p>We also added arithmetic operators <code>add<\/code>, <code>subtract<\/code>, <code>multiply<\/code> and <code>divide<\/code>:<\/p>\n<p>Finally, we added another mini-DSL for the <code>CASE<\/code> statement. CASE can be used to produce alternative results depending on a condition. Either the condition is made explicit in each alternative <code>WHEN<\/code> clause (the expression there is a conditional one, and this form of CASE is called a &#8220;search case&#8221;), or the condition is just equality with an identifier\/expression given at the beginning of the CASE (like <code>CASE user.gender WHEN \"male\" THEN 1<\/code>). Here is an example of the DSL in action:<\/p>\n<h3>Index Management DSL<\/h3>\n<p>If you have already played with N1QL, you know that you can create indexes to significantly speed up your queries. Up until now, the only way to create them programatically was to issue a raw String statement. Not any more!<\/p>\n<p>The index management DSL offers support for the various operations that relate to indexes, namely:<\/p>\n<p>Creating an index:<\/p>\n<p>Creating a <em>primary<\/em> index:<\/p>\n<p>Dropping indexes:<\/p>\n<p>Building indexes that were deferred upon creation:<\/p>\n<p>Notice how most identifiers (index names, namespace\/keyspace) are automatically escaped by backticks.<\/p>\n<h3>Bucket Password Support<\/h3>\n<p>When querying the N1QL service, we now automatically enrich the request headers with authentication information obtained from the calling <code>Bucket<\/code>, which allows to query a password-protected bucket transparently (as was already the case for <code>ViewQuery<\/code>s).<\/p>\n<h2>Entity Mapping<a id=\"odm\"><\/a><\/h2>\n<p>This feature has been requested a lot in the past: the ability to easily map a domain object to a Couchbase document, and vice-versa.<\/p>\n<p>We have started exploring this <code>Entity Mapping<\/code> feature (or <code>ODM<\/code>, <code>Object Document Mapping<\/code>) in 2.2. The approach is to provide an API similar to <code>Bucket<\/code> dedicated to ODM. This API is described in the <code>Repository<\/code> interface, and one can obtain a repository from a bucket by calling <code>bucket.repository()<\/code>.<\/p>\n<p>Methods in the repository API deal with a new type of <code>Document<\/code>, the <code>EntityDocument<\/code>. It sticks to the Document semantic that separate metadata from content (your domain object in this case). The domain object is expected to be annotated (see below) for mapping to work.<\/p>\n<p><code>EntityDocument<\/code> can be used to explicitely give an <code>id<\/code>, to be used as primary key in Couchbase, but contrary to the other <code>Document<\/code> implementations you&#8217;re used to, this is optional. As an alternative, you can annotate a <code>String<\/code> attribute in your domain class with <code>@Id<\/code> to use its as document id. <code>@Id<\/code> attribute is never stored into the JSON content in Couchbase&#8230;<\/p>\n<p>Only attributes that are marked with the <code>@Field<\/code> annotation are taken into account and made part of the JSON content in database\/injected back into the object upon <code>get<\/code>. This annotation can also bear an alias for the field name:<\/p>\n<p>Current limitations (some of which may be lifted in the future) are:<\/p>\n<ul>\n<li><code>@Field<\/code> is only supported on basic type attributes (the ones that can be added to a <code>JsonObject<\/code>), and in general this ODM is for simple cases. Support for Maps, Lists and custom Converters is in the works.<\/li>\n<li>only classes with zero-arg constructors are supported for ODM.<\/li>\n<li>mapping is done via reflection to get\/set values of the attributes the first time (it is internally cached after).<\/li>\n<\/ul>\n<h2>Enhancements on the API<a id=\"enhancement\"><\/a><\/h2>\n<p>The existing <code>Bucket<\/code> API has seen a couple of enhancements.<\/p>\n<p>First, a new operation has been introduced to easily check for the existance of a key without paying the cost of actually <code>get<\/code>ting the content of the document. This is the <code>exist(String key)<\/code> method:<\/p>\n<p>Secondly, a feature related to <strong>views<\/strong> that was present in the 1.x generation of the SDK but not the 2.x one is the ability to request a bulk get of the documents when doing a view query (the <code>includeDocs<\/code> option).<\/p>\n<p>This is not really hard to do in 2.x when using the <code>async<\/code> API (using the <a href=\"\">bulk pattern<\/a> that relies on RxJava), but it is lacking when using sync API. Indeed, the only way to get each row&#8217;s corresponding document in sync mode is to call <code>row.document()<\/code>, which will block and fire one request per row, serially. This is pretty inefficient!<\/p>\n<p>So we&#8217;ve reintroduced the <code>includeDocs<\/code> option in the view querying API. This will trigger efficient async loading of each row&#8217;s document in the background, from which the blocking API benefits as well (the rows will already have the <code>Document<\/code> cached when calling <code>document()<\/code> on them). You can also use it on the asynchronous API, but there it is more or less a &#8220;noop&#8221; when you call <code>.document()<\/code> on the <code>AsyncViewRow<\/code>.<\/p>\n<h2>Retry helper<a id=\"retry\"><\/a><\/h2>\n<p>This is actually something that was part of release <code>2.1.2<\/code>, but it deserves mention in a blog post.<\/p>\n<p>One of the benefits of using <code>RxJava<\/code> is that you can meaningfuly compose Rx operators and benefit from advanced error handling primitives. Among them is the <code>retry<\/code> and <code>retryWhen<\/code> variants, that allow to retry an asynchronous flow on various conditions.<\/p>\n<p>For example, you may want to retry a <code>get<\/code> request when receiving <code>BackpressureException<\/code> (the rate at which you request is too high for the SDK\/server to cope) or <code>TemporaryFailureException<\/code> (the server notified that it was too busy and that requests should be delayed a little bit). You may only want to retry up to 4 times, and wait a bit before doing so&#8230; Maybe you even want this delay to grow between each attempt (<em>Exponential Backoff<\/em>)?<\/p>\n<p>Previously this required a little bit of Rx knowledge to implement, but since this is such a common use case we&#8217;ve brought you helper classes to easily do that, in the <code>com.couchbase.client.java.util.retry<\/code> package.<\/p>\n<p>The helper can either produce a <code>Function<\/code> that can be directly passed to an <code>Observable<\/code>&#8216;s <code>retryWhen<\/code> operator, or it can also wrap an existing <code>Observable<\/code> intro a retrying one.<\/p>\n<p>To wrap an <code>Observable<\/code>, use <code>Retry.wrapForRetry(...)<\/code> static methods. These will allow you to cover basic requirements like retrying for a maximum number of attempts, describing the kind of <code>Delay<\/code> you want between attempts.<\/p>\n<p>For even more advanced use cases, there&#8217;s the <code>RetryBuilder<\/code> (which produces a function to be passed to Rx&#8217;s <code>retryWhen<\/code> operator). This builder allows you to:<\/p>\n<ul>\n<li>choose on which kind of errors to retry (either <code>any()<\/code>, <code>anyOf(...)<\/code>, <code>allBut(...)<\/code>).<\/li>\n<li>choose how many times to retry (either <code>once()<\/code> or <code>max(n)<\/code> times).<\/li>\n<li>customize the <code>Delay<\/code> and on which <code>Scheduler<\/code> to wait (<code>delay(...)<\/code> methods).<\/li>\n<\/ul>\n<p>Here is a complete example that matches the requirement expressed above:<\/p>\n<h2>Dependency updates<a id=\"dependencies\"><\/a><\/h2>\n<p>In this version, <code>RxJava<\/code> has been bumped to version <code>1.0.9<\/code>. We&#8217;ve also upgraded the internal dependencies (which are repackaged, so it&#8217;s transparent to your application) to the latest bugfix releases.<\/p>\n<h2>Conclusion<a id=\"conclusion\"><\/a><\/h2>\n<p>We hope that you will enjoy these new features of the 2.2 release. As always, we welcome feedback, especially on the Entity Mapping feature and direction. So go play with it, and tell us what you think on the <a href=\"https:\/\/www.couchbase.com\/forums\/c\/java-sdk\/\">forums<\/a> for instance!<\/p>\n<p>To get your hands on the 2.2-dp, use the following in a Maven pom.xml (or directly download the jars for <a href=\"https:\/\/files.couchbase.com\/maven2\/com\/couchbase\/client\/core-io\/1.2.0-dp\/core-io-1.2.0-dp.jar\">core<\/a> and <a href=\"https:\/\/files.couchbase.com\/maven2\/com\/couchbase\/client\/java-client\/2.2.0-dp\/java-client-2.2.0-dp.jar\">client<\/a>):<\/p>\n<p>Of course, we also <strong>fixed bugs<\/strong> in this developer preview, that will also be part of <strong>2.1.3 official release scheduled next week<\/strong>.<\/p>\n<p>We&#8217;re not done for 2.2 yet! We&#8217;ll have plenty of features upcoming, including <em>more<\/em> N1QL support, and <strong>built-in profiling and metrics<\/strong>.<\/p>\n<p>Happy Coding!<br \/>\n<br \/> &#8211; The Java SDK Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On behalf of the SDK Team, it is my pleasure to introduce the next big release for the Java SDK, the 2.2 version. The team has been working hard to bring you new awesome features, and today we think it&#8217;s [&hellip;]<\/p>\n","protected":false},"author":48,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"ppma_author":[9022],"class_list":["post-1924","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.0 (Yoast SEO v26.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Couchbase Java SDK 2.2 Developer Preview 1 - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Couchbase Java SDK 2.2 Developer Preview 1\" \/>\n<meta property=\"og:description\" content=\"On behalf of the SDK Team, it is my pleasure to introduce the next big release for the Java SDK, the 2.2 version. The team has been working hard to bring you new awesome features, and today we think it&#8217;s [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-04-30T08:02:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-09T14:18:47+00:00\" \/>\n<meta name=\"author\" content=\"Simon Basle, Software Engineer, Pivotal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Simon Basle, Software Engineer, Pivotal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/\"},\"author\":{\"name\":\"Simon Basle, Software Engineer, Pivotal\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/a4086d75b59570cc2e5ff66d98c5d1a1\"},\"headline\":\"Couchbase Java SDK 2.2 Developer Preview 1\",\"datePublished\":\"2015-04-30T08:02:50+00:00\",\"dateModified\":\"2025-10-09T14:18:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/\"},\"wordCount\":1585,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/\",\"name\":\"Couchbase Java SDK 2.2 Developer Preview 1 - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2015-04-30T08:02:50+00:00\",\"dateModified\":\"2025-10-09T14:18:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Couchbase Java SDK 2.2 Developer Preview 1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/a4086d75b59570cc2e5ff66d98c5d1a1\",\"name\":\"Simon Basle, Software Engineer, Pivotal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/4b2bcd169f85f21cee7b8a0e0c9e7854\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3c3aec94782fea5f0a199368c15e836198faf05c1591e0ae0b91178a59457781?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3c3aec94782fea5f0a199368c15e836198faf05c1591e0ae0b91178a59457781?s=96&d=mm&r=g\",\"caption\":\"Simon Basle, Software Engineer, Pivotal\"},\"description\":\"Simon Basl_ is a Paris-based Software Engineer working in the Spring team at Pivotal. Previously, he worked in the Couchbase Java SDK team. His interests span software design aspects (OOP, design patterns, software architecture), rich clients, what lies beyond code (continuous integration, (D)VCS, best practices), and reactive programming. He is also an editor for the French version of InfoQ.com.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/simon-basle\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Couchbase Java SDK 2.2 Developer Preview 1 - The Couchbase Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/","og_locale":"en_US","og_type":"article","og_title":"Couchbase Java SDK 2.2 Developer Preview 1","og_description":"On behalf of the SDK Team, it is my pleasure to introduce the next big release for the Java SDK, the 2.2 version. The team has been working hard to bring you new awesome features, and today we think it&#8217;s [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/","og_site_name":"The Couchbase Blog","article_published_time":"2015-04-30T08:02:50+00:00","article_modified_time":"2025-10-09T14:18:47+00:00","author":"Simon Basle, Software Engineer, Pivotal","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Simon Basle, Software Engineer, Pivotal","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/"},"author":{"name":"Simon Basle, Software Engineer, Pivotal","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/a4086d75b59570cc2e5ff66d98c5d1a1"},"headline":"Couchbase Java SDK 2.2 Developer Preview 1","datePublished":"2015-04-30T08:02:50+00:00","dateModified":"2025-10-09T14:18:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/"},"wordCount":1585,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/","url":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/","name":"Couchbase Java SDK 2.2 Developer Preview 1 - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2015-04-30T08:02:50+00:00","dateModified":"2025-10-09T14:18:47+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/javasdk-2-2-dp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Couchbase Java SDK 2.2 Developer Preview 1"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/a4086d75b59570cc2e5ff66d98c5d1a1","name":"Simon Basle, Software Engineer, Pivotal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/4b2bcd169f85f21cee7b8a0e0c9e7854","url":"https:\/\/secure.gravatar.com\/avatar\/3c3aec94782fea5f0a199368c15e836198faf05c1591e0ae0b91178a59457781?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3c3aec94782fea5f0a199368c15e836198faf05c1591e0ae0b91178a59457781?s=96&d=mm&r=g","caption":"Simon Basle, Software Engineer, Pivotal"},"description":"Simon Basl_ is a Paris-based Software Engineer working in the Spring team at Pivotal. Previously, he worked in the Couchbase Java SDK team. His interests span software design aspects (OOP, design patterns, software architecture), rich clients, what lies beyond code (continuous integration, (D)VCS, best practices), and reactive programming. He is also an editor for the French version of InfoQ.com.","url":"https:\/\/www.couchbase.com\/blog\/author\/simon-basle\/"}]}},"authors":[{"term_id":9022,"user_id":48,"is_guest":0,"slug":"simon-basle","display_name":"Simon Basle, Software Engineer, Pivotal","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/3c3aec94782fea5f0a199368c15e836198faf05c1591e0ae0b91178a59457781?s=96&d=mm&r=g","author_category":"","last_name":"Basle","first_name":"Simon","job_title":"","user_url":"","description":"Simon Basl_ is a Paris-based Software Engineer working in the Spring team at Pivotal. Previously, he worked in the Couchbase Java SDK team. His interests span software design aspects (OOP, design patterns, software architecture), rich clients, what lies beyond code (continuous integration, (D)VCS, best practices), and reactive programming. He is also an editor for the French version of InfoQ.com."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=1924"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1924\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=1924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=1924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=1924"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=1924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}