Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.5 GA Java Client [PA-512] #1357

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 18 additions & 26 deletions docs/modules/clients/pages/java.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Java Client
client= Java Client
:page-api-reference: https://docs.hazelcast.org/docs/{page-latest-supported-java-client}/javadoc
:page-toclevels: 1
:page-aliases: security:native-client-security.adoc
Expand All @@ -9,21 +9,23 @@

Hazelcast provides a {java-client} which you can use to connect to a Hazelcast cluster. `hazelcast-<VERSION>.jar` is bundled in the Hazelcast standard package, so just add `hazelcast-<VERSION>.jar` to your classpath and you can start using this client as if you are using the Hazelcast API.

If you are interested in using a standalone or lightweight Java client, you can try the {java-client-new}. This client is currently available as Beta functionality but can interact with a Hazelcast cluster without being a full member. Please note that the {java-client-new} doesn't have full feature parity with the {java-client} yet and is not recommended for production environments. For more info, see xref:java#java-client-standalone-beta[].
If you are interested in using a standalone or lightweight Java client, you can try the {java-client-new}. This client can interact with a Hazelcast cluster without being a full member. Please note that while the {java-client-new} provides full feature parity with the {java-client} in terms of functionality, there are some differences that should be considered before deciding to use it in production environments. For more info, see xref:java#java-client-standalone[].

NOTE: Where there are specific differences between {java-client} and {java-client-new}, this documentation will specify the appropriate client. Otherwise you can assume that generic references to client refer to both versions of the Java client.

// check production recommendation

Both clients enable you to use the Hazelcast API, with this page explaining any differences or technical details that affect usage. This page should be read alongside the respective Javadoc-generated API documentation available from within your IDE and the following links:

// TODO: do we still have separate JavaDocs for the two clients?

* https://docs.hazelcast.org/docs/{page-latest-supported-java-client}/javadoc[Hazelcast {java-client} API documentation]
* https://docs.hazelcast.org/hazelcast-java-client/{page-latest-supported-java-client-new}/javadoc[Hazelcast {java-client-new} API documentation]

== Get started

* xref:java#get-started-with-java-client-and-embedded-server[]
* xref:java#get-started-with-java-client-standalone-beta[]
* xref:java#get-started-with-java-client-standalone[]

=== Get started with {java-client}

Expand Down Expand Up @@ -72,7 +74,7 @@ You can find {java-client} code samples in the https://github.com/hazelcast/haze

TIP: For a tutorial on getting started with Java in an embedded topology, see xref:getting-started:get-started-java.adoc[].

=== Get started with {java-client-new} (BETA)
=== Get started with {java-client-new}

To get started using the {java-client-new}, you need to add the `hazelcast-java-client` dependency to your pom.xml, as shown below. You can then start using this client as if
you are using the Hazelcast API.
Expand Down Expand Up @@ -113,17 +115,16 @@ If you are using `hazelcast-enterprise-java-client`, you need to add the `hazelc
To migrate an application from the {java-client} to the {java-client-new}, you only have to update the dependency as described above.

[java-client-standalone]
==== {java-client-new} (BETA)

The {java-client-new} is only available as a Beta release and does not have full feature parity with the {java-client}. Please note the following differences and restrictions:
==== {java-client-new}

// check standalone
The {java-client-new} provides full feature parity with the {java-client} in terms of functionality. However, please note the following differences and restrictions:

* Hazelcast Cloud is not supported
* You cannot use the {java-client} and the {java-client-new} on the same JVM
* Any methods that raise the`UnsupportedOperationException` exception are not available e.g. `addLocalEntryListener(@Nonnull MapListener listener)`
* MultiMap and Set are not supported data structures
* Some client system properties are not supported (see individual notes)
* Client Configuration Import is not supported.
* XA Transactions are not supported.
* For Pipeline API only built-in sources and sinks are supported.
* Cloud support is only for Hazelcast Cloud and Kubernetes.
* Session replication with Spring Boot is not supported.
* You cannot use the {java-client} and the {java-client-new} on the same JVM.

=== Client API
The Client API is your gateway to access your Hazelcast cluster, including distributed objects and data pipelines (jobs).
Expand Down Expand Up @@ -195,9 +196,7 @@ The `addLocalEntryListener()` and `localKeySet()` methods are not supported beca

=== Use MultiMap

NOTE: This section is only applicable to the {java-client}.

You can use a distributed multiMap object with the {java-client}, as follows:
You can use a distributed multiMap object with the client, as follows:

[source,java]
----
Expand Down Expand Up @@ -236,7 +235,7 @@ The logic is the same for both member and client side, so see the specific secti

* xref:data-structures:replicated-map.adoc[Replicated Map]
* xref:data-structures:list.adoc[List]
* xref:data-structures:set.adoc[Set] (not supported by {java-client-new})
* xref:data-structures:set.adoc[Set]
* xref:data-structures:iatomiclong.adoc[IAtomicLong]
* xref:data-structures:iatomicreference.adoc[IAtomicReference]
* xref:data-structures:icountdownlatch.adoc[ICountDownLatch]
Expand Down Expand Up @@ -507,6 +506,7 @@ security:

For more information, see the appropriate API documentation for your client:

// TODO: separate JavaDocs?
* https://docs.hazelcast.org/docs/{full-version}/javadoc/com/hazelcast/client/config/ClientSecurityConfig.html[{java-client-new} ClientSecurityConfig API documentation]
* https://docs.hazelcast.org/hazelcast-java-client/{page-latest-supported-java-client-new}/javadoc/com/hazelcast/client/config/ClientSecurityConfig.html[{java-client} ClientSecurityConfig API documentation]

Expand Down Expand Up @@ -1659,9 +1659,7 @@ For a programmatic example, see this xref:java#programmatic-configuration-5[code

=== Configure Hazelcast {hazelcast-cloud}

NOTE: This section is only applicable to the {java-client}.

You can connect the {java-client} to a {hazelcast-cloud} Standard cluster which is hosted on link:{url-cloud-signup}[{hazelcast-cloud}].
You can connect the client to a {hazelcast-cloud} Standard cluster which is hosted on link:{url-cloud-signup}[{hazelcast-cloud}].
For this, you need to enable {hazelcast-cloud} and specify the cluster's discovery token provided while creating the cluster; this allows the cluster to discover your clients.
See the following example configurations:

Expand Down Expand Up @@ -1986,8 +1984,6 @@ NOTE: You need to restart clients after modifying system properties.
|long
|Token to use when discovering the cluster via {hazelcast-cloud}.

NOTE: Not supported by {java-client-new}.

|`hazelcast.client.concurrent.window.ms`
|100
|int
Expand All @@ -1999,8 +1995,6 @@ Setting it too high effectively disables the optimization because once concurren
it will keep that way. Setting it too low could lead to suboptimal performance because the system
will try to use write-through and other optimizations even though the system is concurrent.

NOTE: Not supported by {java-client-new}.

|`hazelcast.discovery.enabled`
|false
|bool
Expand Down Expand Up @@ -2166,8 +2160,6 @@ increased performance and reduced memory usage.
to the same member when this property is `true`. When it is set to `false`,
the client tries to connect to the members in the given order.

NOTE: Not supported by {java-client-new}.

|`hazelcast.client.connectivity.logging.delay.seconds`
|10
|int
Expand Down