Skip to content

Commit 13af605

Browse files
Merge branch 'release/3.5' of https://github.com/couchbase/docs-sdk-java into release/3.5
2 parents ed602b4 + 8631973 commit 13af605

10 files changed

Lines changed: 154 additions & 35 deletions

File tree

modules/hello-world/pages/start-using-sdk.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ We recommend running the latest Java LTS version (i.e. at the time of writing JD
6262
// Other supported Java versions will work, too.
6363
Couchbase publishes all stable artifacts to https://central.sonatype.com/namespace/com.couchbase.client[Maven Central].
6464

65-
The latest version (as of September 2023) is https://central.sonatype.com/artifact/com.couchbase.client/java-client/3.4.10/jar[3.4.10].
65+
The latest version (as of October 2023) is https://central.sonatype.com/artifact/com.couchbase.client/java-client/3.4.11/jar[3.4.11].
6666

6767
You can use your favorite dependency management tool to install the SDK.
6868

@@ -77,7 +77,7 @@ Maven::
7777
<dependency>
7878
<groupId>com.couchbase.client</groupId>
7979
<artifactId>java-client</artifactId>
80-
<version>3.4.10</version>
80+
<version>3.4.11</version>
8181
</dependency>
8282
</dependencies>
8383
----
@@ -88,7 +88,7 @@ Gradle::
8888
--
8989
[source,groovy]
9090
----
91-
implementation 'com.couchbase.client:java-client:3.4.10'
91+
implementation 'com.couchbase.client:java-client:3.4.11'
9292
----
9393
--
9494
====

modules/howtos/examples/Auth.java

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@
1414
* limitations under the License.
1515
*/
1616

17-
import static com.couchbase.client.java.ClusterOptions.clusterOptions;
18-
19-
import java.security.KeyStore;
20-
17+
import com.couchbase.client.core.env.Authenticator;
2118
import com.couchbase.client.core.env.CertificateAuthenticator;
2219
import com.couchbase.client.core.env.PasswordAuthenticator;
2320
import com.couchbase.client.core.error.InvalidArgumentException;
2421
import com.couchbase.client.java.Cluster;
2522

23+
import java.nio.file.Paths;
24+
import java.security.KeyStore;
25+
26+
import static com.couchbase.client.java.ClusterOptions.clusterOptions;
27+
2628
public class Auth {
2729

2830
public static void main(String... args) {
@@ -53,11 +55,27 @@ public static void main(String... args) {
5355
{
5456
try {
5557
// tag::certauth[]
56-
// should be replaced with your actual KeyStore
58+
// Replace the following line with code that gets your actual key store.
59+
// The key store contains the client's certificate and private key.
5760
KeyStore keyStore = loadKeyStore();
5861

59-
CertificateAuthenticator authenticator = CertificateAuthenticator.fromKeyStore(keyStore, "keyStorePassword");
60-
Cluster cluster = Cluster.connect("127.0.0.1", clusterOptions(authenticator));
62+
Authenticator authenticator = CertificateAuthenticator.fromKeyStore(
63+
keyStore,
64+
"keyStorePassword"
65+
);
66+
67+
Cluster cluster = Cluster.connect(
68+
"couchbases://127.0.0.1",
69+
clusterOptions(authenticator)
70+
.environment(env -> env
71+
.securityConfig(security -> security
72+
// Tell the client to trust the cluster's root certificate.
73+
// If your cluster's root certificate is from a well-known
74+
// Certificate Authority (CA), you can skip this.
75+
.trustCertificate(Paths.get("/path/to/ca-cert.pem"))
76+
)
77+
)
78+
);
6179
// end::certauth[]
6280
} catch (InvalidArgumentException e) {
6381
// The code requires a valid keystore, catching the exception for

modules/howtos/pages/kv-operations.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ include::example$KvOperations.cs[tag=binarydecrementwithoptions,indent=0]
285285
////
286286
NOTE: Increment & Decrement are considered part of the ‘binary’ API and as such may still be subject to change
287287

288+
TIP: Setting the document expiry time only works when a document is created, and it is not possible to update the expiry time of an existing counter document with the Increment method -- to do this during an increment, use with the `Touch()` method.
289+
290+
291+
292+
// Atomicity Across Data Centers
288293

289294
include::{version-common}@sdk:shared:partial$atomic.adoc[tag=xdcr]
290295

modules/howtos/pages/n1ql-queries-with-sdk.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ include::example$SimpleQuery.java[tag=class,indent=0]
5151
--
5252
====
5353

54-
Let's break it down. A query is always performed at the `Cluster` level, using the `query` method. It takes the statement as a required argument and then allows to provide additional options if needed (in the example above, no options are specified).
54+
Note that building indexes is covered in some detail on the xref:concept-docs:n1ql-query.adoc#index-building[Query concept page], which you should take a quick look at --
55+
and in the https://docs.couchbase.com/sdk-api/couchbase-java-client/com/couchbase/client/java/manager/query/package-summary.html[API Reference].
56+
57+
Let's break down the above code snippet.
58+
A query is always performed at the `Cluster` level, using the `query` method. It takes the statement as a required argument and then allows to provide additional options if needed (in the example above, no options are specified).
5559

5660
Once a result returns you can iterate the returned rows and/or accessing the `QueryMetaData` associated with the query. If something goes wrong during the execution of the query, a derivate of the `CouchbaseException` will be thrown that also provides additional context on the operation:
5761

modules/howtos/pages/sdk-authentication.adoc

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,26 @@ include::{version-common}@sdk:shared:partial$auth-overview.adoc[tag=cert-auth]
4545

4646
== Authenticating the Java Client by Certificate
4747

48-
For sample procedures whereby certificates can be generated and deployed, see xref:7.1@server:manage:manage-security/manage-certificates.adoc[Manage Certificates].
49-
The rest of this document assumes that the processes there, or something similar, have been followed.
50-
That is, a cluster certificate has been created and installed on the server, a client certificate has been created, and it is stored in a JVM keystore along with the cluster's certificate.
48+
To learn how to generate and deploy certificates, see xref:{server_version}@server:manage:manage-security/manage-certificates.adoc[Manage Certificates].
49+
The rest of this section assumes you followed those processes, or did something similar.
50+
51+
For the following example, you will need a client certificate and the associated private key.
52+
These must be stored together in the same Java KeyStore file or pkcs12 bundle.
53+
54+
If your cluster's root certificate does not come from a well-known Certificate Authority (CA), you must tell the client to trust the cluster's root certificate.
55+
This example assumes the cluster's root certificate is available in a file called `ca-cert.pem`.
56+
57+
TIP: To trust multiple root certificates, put them all in the same `ca-certs.pem` file.
5158

5259
[source,java]
5360
----
5461
include::example$Auth.java[tag=certauth,indent=0]
5562
----
5663

57-
In addition to providing the initialized `KeyStore` directly, the `CertificateAuthenticator` can also be initialized from a key store path, a key directly or a `KeyManagerFactory` for maximum flexibility. Please see the API documentation for the `CertificateAuthenticator` for more details.
64+
`CertificateAuthenticator` has several static factory methods.
65+
If you prefer not to load your own `KeyStore` object, you can create a `CertificateAuthenticator` from a `Path` to a key store file, or from an in-memory certificate & key.
66+
For maximum flexibility, you can even provide your own `KeyManagerFactory`.
67+
Please see the https://docs.couchbase.com/sdk-api/couchbase-core-io/com/couchbase/client/core/env/CertificateAuthenticator.html[API documentation] for the `CertificateAuthenticator` for more details.
5868

5969
include::{version-common}@sdk:shared:partial$auth-overview.adoc[tag=ldap]
6070

modules/project-docs/pages/compatibility.adoc

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include::project-docs:partial$attributes.adoc[]
1010
[abstract]
1111
{description}
1212

13-
The 3.4 SDK requires Java 8 or later to be installed, earlier versions will not work.
13+
The 3.5 SDK requires Java 8 or later to be installed, earlier versions will not work.
1414
_Java 17 is recommended_, which has various enhancements like sealed classes, pattern matching for switch expressions (in preview), and further updates and improvements on core libraries.
1515
Most of the flavors available will do, although we may only provide support for OpenJDK and Oracle JDK going forward.
1616

@@ -29,11 +29,11 @@ It is best to upgrade either the SDK or the Couchbase version you are using.
2929
[#table_sdk_versions]
3030
[cols="40,20,25"]
3131
|===
32-
| | 3.1 | SDK 3.2-3.4
32+
| | 3.1 | SDK 3.2-3.5
3333

3434
| *Server 6.6*
35-
| **
36-
| **
35+
| **
36+
| **
3737

3838
| *Server 7.0-7.2*
3939
| *◎*
@@ -100,7 +100,7 @@ Microsoft Windows 10 / All LTS releases from Windows Server 2016.
100100
=== Mac OS X
101101
102102
The current and previous two releases of OS X.
103-
At time of writing (October 2022): 13 (Ventura), 12 (Monterey), and 11 (Big Sur).
103+
At time of writing (November 2023): 14 (Sonoma), 13 (Ventura), and 12 (Monterey).
104104
M1 ARM architecture is fully supported in the Java SDK.
105105
106106
[discrete]
@@ -151,39 +151,43 @@ The downside of these workarounds is potentially reduced performance, which can
151151

152152
.Couchbase Server and SDK Supported Version Matrix
153153
[.table-merge-cells]
154-
[cols="7,5,7"]
154+
[cols="7,5,6.7"]
155155
|===
156-
| | Server 6.6 | Server 7.0 & 7.1
156+
| | Server 6.6 | Server 7.0 & 7.1 | Server 7.2
157157

158158
| Enhanced Durability
159-
2+| All SDK versions
159+
3+| All SDK versions
160160

161161
| Durable Writes
162-
2+| Since SDK 3.0
162+
3+| Since SDK 3.0
163163

164164
| Analytics
165-
2+| Since SDK 2.7
165+
3+| Since SDK 2.7
166166

167167
| Distributed ACID Transactions
168-
2+| Since SDK 3.3 included in SDK, or since SDK 3.0 with Java Transactions Libraryfootnote:[3.0.7 or more recent recommended; preferably, follow the transitive dependency for the transactions library in Maven.]
168+
3+| Since SDK 3.3 included in SDK, or since SDK 3.0 with Java Transactions Libraryfootnote:[3.0.7 or more recent recommended; preferably, follow the transitive dependency for the transactions library in Maven.]
169169

170170
| {sqlpp} Queries inside the Transaction Lambda
171171
| Not Supported
172-
| Since SDK 3.1, or since 3.0.7 with Java Transactions Libraryfootnote:[1.2.1 or newer recommended.]
172+
2+| Since SDK 3.1, or since 3.0.7 with Java Transactions Libraryfootnote:[1.2.1 or newer recommended.]
173173

174174
| Collections
175175
| Developer Preview in 6.6, SDK 3.0
176-
| Since SDK 3.0.6
176+
2+| Since SDK 3.0.6
177177

178178
| Scope-Level {sqlpp} Queries & all Collections features
179179
| Not Supported
180-
| Since SDK 3.2.0
180+
2+| Since SDK 3.2.0
181181

182182
| Field Level Encryption v2
183-
2+| Since SDK 3.0.5footnote:[Field Level Encryption distributed as separate library.]
183+
3+| Since SDK 3.0.5footnote:[Field Level Encryption distributed as separate library.]
184184

185185
| Request Tracing
186-
2+| Since SDK 3.1.0
186+
3+| Since SDK 3.1.0
187+
188+
| Cloud Native Gateway
189+
2+| Not Supported
190+
| From SDK 3.5.0 (with xref:operator::overview.adoc[Couchbase Autonomous Operator] 2.6+)
187191
|===
188192

189193

modules/project-docs/pages/sdk-full-installation.adoc

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ We recommend running the latest Java LTS version (i.e. at the time of writing JD
3333
Java 17 has various enhancements like sealed classes, pattern matching for switch expressions (in preview), and further updates and improvements on core libraries.
3434

3535
Couchbase publishes all stable artifacts to https://central.sonatype.com/namespace/com.couchbase.client[Maven Central].
36-
The latest version (as of September 2023) is https://central.sonatype.com/artifact/com.couchbase.client/java-client/3.4.10/jar[3.4.10].
36+
The latest version (as of October 2023) is https://central.sonatype.com/artifact/com.couchbase.client/java-client/3.4.11/jar[3.4.11].
3737

3838
You can use your favorite dependency management tool to install the SDK.
3939

@@ -50,7 +50,7 @@ For https://maven.apache.org[Maven], you can insert the following into the depen
5050
<dependency>
5151
<groupId>com.couchbase.client</groupId>
5252
<artifactId>java-client</artifactId>
53-
<version>3.4.10</version>
53+
<version>3.4.11</version>
5454
</dependency>
5555
----
5656
Refer to the https://maven.apache.org/guides/introduction/introduction-to-the-pom.html/[Maven Documentation] for more information regarding the structure of the `pom.xml` file.
@@ -62,7 +62,7 @@ For https://gradle.org/[Gradle], you can use:
6262
6363
[source,groovy]
6464
----
65-
implementation 'com.couchbase.client:java-client:3.4.10'
65+
implementation 'com.couchbase.client:java-client:3.4.11'
6666
----
6767
--
6868
====
@@ -72,3 +72,43 @@ Refer to the xref:project-docs:sdk-release-notes.adoc[Release Notes] for further
7272
You can also find links to the hosted javadocs there.
7373

7474

75+
[snapshots]
76+
== Using a Snapshot Version
77+
78+
Couchbase publishes pre-release snapshot artifacts to the Sonatype OSS Snapshot Repository.
79+
If you wish to use a snapshot version, you'll need to tell your build tool about this repository.
80+
81+
[{tabs}]
82+
====
83+
Maven::
84+
+
85+
--
86+
.`*pom.xml*`
87+
[source,xml]
88+
----
89+
<repositories>
90+
<repository>
91+
<id>sonatype-snapshots</id>
92+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
93+
<releases><enabled>false</enabled></releases>
94+
<snapshots><enabled>true</enabled></snapshots>
95+
</repository>
96+
</repositories>
97+
----
98+
--
99+
Gradle (Groovy)::
100+
+
101+
--
102+
.`*build.gradle*`
103+
[source,groovy]
104+
----
105+
repositories {
106+
mavenCentral()
107+
maven {
108+
url "https://oss.sonatype.org/content/repositories/snapshots"
109+
mavenContent { snapshotsOnly() }
110+
}
111+
}
112+
----
113+
--
114+
====

modules/project-docs/pages/sdk-release-notes.adoc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,42 @@ All patch releases for each dot minor release should be API compatible, and safe
2929
any changes to expected behavior are noted in the release notes that follow.
3030

3131

32+
=== Version 3.4.11 (4 October 2023)
33+
34+
With thanks to our community for the contribution, support for Micrometer Observation has been added via the new `tracing-micrometer-observation` module.
35+
36+
https://packages.couchbase.com/clients/java/3.4.11/Couchbase-Java-Client-3.4.11.zip[Download] |
37+
https://docs.couchbase.com/sdk-api/couchbase-java-client-3.4.11/index.html[API Reference] |
38+
http://docs.couchbase.com/sdk-api/couchbase-core-io-2.4.11/[Core API Reference]
39+
40+
The supported and tested dependencies for this release are:
41+
42+
* io.projectreactor:**reactor-core:3.5.8**
43+
* org.reactivestreams:**reactive-streams:1.0.4**
44+
45+
Optional artifacts on top of this SDK version are tested for the following compatibilities:
46+
47+
.Optional Artifact Version Compatibility
48+
[options="header"]
49+
|=======================
50+
| Artifact | Couchbase Version | Built Against | API Stability
51+
| `tracing-opentelemetry` | 1.2.11 | OpenTelemetry 1.19.0 | Committed
52+
| `tracing-opentracing` | 1.2.11 | OpenTracing 0.33.0 | Committed
53+
| `metrics-opentelemetry` | 0.4.11 | OpenTelemetry 1.19.0 | Volatile
54+
| `metrics-micrometer` | 0.4.11 | Micrometer 1.10.0 | Volatile
55+
|=======================
56+
57+
==== Improvements
58+
* https://issues.couchbase.com/browse/JCBC-2046[JCBC-2046]:
59+
With thanks to our community for the contribution, support for Micrometer Observation has been added via the new `tracing-micrometer-observation` module.
60+
* https://issues.couchbase.com/browse/JVMCBC-1327[JVMCBC-1327]:
61+
Internal improvements to support upcoming faster failover and config push features.
62+
63+
==== Bugfixes
64+
* https://issues.couchbase.com/browse/JVMCBC-1364[JVMCBC-1364]:
65+
Fixed decoding of certain niche sub-document errors, so they no longer raise a `DecodingFailureException`.
66+
67+
3268
=== Version 3.4.10 (6 September 2023)
3369

3470
This is a standard maintenance release.

modules/ref/pages/client-settings.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ System Property: `com.couchbase.env.timeout.kvDurableTimeout`
377377
+
378378
Key/Value operations with enhanced durability requirements may take longer to complete, so they have a separate default timeout.
379379
+
380+
*Do not* set this above 65s, which is the maximum possible `SyncWrite` timeout on the Server side.
381+
+
380382
WARNING: The `kvDurableTimeout` property is not part of the stable API and may change or be removed at any time.
381383

382384
// todo: is kvDurableTimeout a strictly client-side timeout?

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<dependency>
2323
<groupId>com.couchbase.client</groupId>
2424
<artifactId>java-client</artifactId>
25-
<version>3.4.10</version>
25+
<version>3.4.11</version>
2626
</dependency>
2727
<dependency>
2828
<groupId>com.fasterxml.jackson.core</groupId>

0 commit comments

Comments
 (0)