Skip to content

Commit 2211e4c

Browse files
authored
DOC-435: backport standalone tidy to 5.5 (#1673)
1 parent b28f69c commit 2211e4c

File tree

1 file changed

+10
-91
lines changed

1 file changed

+10
-91
lines changed

docs/modules/clients/pages/java.adoc

Lines changed: 10 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,19 @@
11
= Java Client
2+
:page-api-reference: https://docs.hazelcast.org/docs/{os-version}/javadoc
23
:page-toclevels: 1
34
:page-aliases: security:native-client-security.adoc
4-
:description: Hazelcast provides a {java-client} within the standard distribution you can start using right away, and also a lightweight {java-client-new} that is available in Beta.
5+
:description: Hazelcast provides a {java-client} within the standard distribution you can start using right away.
56
[[java-client]]
67

78
== Overview
89

9-
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.
10+
This topic is aimed at developers and describes basic usage, configuration, and advanced features.
1011

11-
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[].
12-
13-
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.
14-
15-
// check production recommendation
16-
17-
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:
18-
19-
* https://docs.hazelcast.org/hazelcast-ee-docs/{ee-version}/javadoc[Hazelcast {java-client} {enterprise-product-name} API documentation]
20-
* https://docs.hazelcast.org/docs/{os-version}/javadoc[Hazelcast {java-client} {open-source-product-name} API documentation]
21-
* https://docs.hazelcast.org/hazelcast-java-client/{page-latest-supported-java-client-new}/javadoc[Hazelcast {java-client-new} API documentation]
12+
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 you simply add this file to your classpath to begin using the client as if you are using the Hazelcast API.
2213

2314
== Get started
2415

25-
* xref:java#get-started-with-java-client-and-embedded-server[]
26-
* xref:java#get-started-with-java-client-standalone-beta[]
27-
28-
=== Get started with {java-client}
29-
30-
To get started using the {java-client}, you need to include the `hazelcast.jar` dependency in your classpath. You can then start using this client as if
31-
you are using the Hazelcast API.
16+
To get started using the {java-client}, you need to include the `hazelcast.jar` dependency in your classpath. You can then start using this client as if you are using the Hazelcast API.
3217

3318
NOTE: If you have a Hazelcast {enterprise-product-name} license, you don't need to set the license key in your Hazelcast Java clients to use the xref:getting-started:editions.adoc#features-in-hazelcast-enterprise[{enterprise-product-name} features]. You only have to set it on the member side, and include the `hazelcast-enterprise-<VERSION>.jar` dependency in your classpath.
3419

@@ -72,57 +57,6 @@ You can find {java-client} code samples in the https://github.com/hazelcast/haze
7257

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

75-
=== Get started with {java-client-new} (BETA)
76-
77-
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
78-
you are using the Hazelcast API.
79-
[source,xml,subs="attributes+"]
80-
----
81-
<dependency>
82-
<groupId>com.hazelcast</groupId>
83-
<artifactId>hazelcast-java-client</artifactId>
84-
<version>{java-client-standalone-version}</version>
85-
</dependency>
86-
----
87-
88-
If you are using `hazelcast-enterprise-java-client`, you need to add the `hazelcast-enterprise-java-client` dependency and private hazelcast repository to your pom.xml file, as shown below:
89-
[source,xml,subs="attributes+"]
90-
----
91-
<dependency>
92-
<groupId>com.hazelcast</groupId>
93-
<artifactId>hazelcast-enterprise-java-client</artifactId>
94-
<version>{java-client-standalone-version}</version>
95-
</dependency>
96-
97-
<repositories>
98-
<repository>
99-
<id>private-repository</id>
100-
<name>Hazelcast Private Repository</name>
101-
<url>https://repository.hazelcast.com/release/</url>
102-
<releases>
103-
<enabled>true</enabled>
104-
</releases>
105-
<snapshots>
106-
<enabled>false</enabled>
107-
</snapshots>
108-
</repository>
109-
</repositories>
110-
----
111-
112-
==== Migrate to {java-client-new} (BETA)
113-
To migrate an application from the {java-client} to the {java-client-new}, you only have to update the dependency as described above.
114-
115-
[java-client-standalone]
116-
==== {java-client-new} (BETA)
117-
118-
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:
119-
120-
* Hazelcast Cloud is not supported
121-
* You cannot use the {java-client} and the {java-client-new} on the same JVM
122-
* Any methods that raise the`UnsupportedOperationException` exception are not available e.g. `addLocalEntryListener(@Nonnull MapListener listener)`
123-
* MultiMap and Set are not supported data structures
124-
* Some client system properties are not supported (see individual notes)
125-
12660
=== Client API
12761
The Client API is your gateway to access your Hazelcast cluster, including distributed objects and data pipelines (jobs).
12862

@@ -138,18 +72,14 @@ clientConfig.setClusterName("dev");
13872
clientConfig.getNetworkConfig().addAddress("10.90.0.1", "10.90.0.2:5702");
13973
----
14074

141-
For further information on client configuration, see <<configure-java-client, Configure the client>>.
14275
For further information on client configuration, see <<configure-java-client, Configure the client>>.
14376

144-
After completing the client configuration, you must create an `HazelcastClient` instance that will initialize and connect to the client based on the specified configuration:
14577
After completing the client configuration, you must create an `HazelcastClient` instance that will initialize and connect to the client based on the specified configuration:
14678

147-
```java
14879
```java
14980
HazelcastInstance client = HazelcastClient.newHazelcastClient(clientConfig);
15081
```
15182

152-
You can create a distributed map and populate it with some data as follows:
15383
You can create a distributed map and populate it with some data as follows:
15484

15585
[source,java]
@@ -175,7 +105,7 @@ This command releases all used resources and closes all connections to the clust
175105

176106
=== Supported data structures
177107

178-
Hazelcast offers distributed implementations of many common data structures, most of which are supported by the {java-client} and {java-client-new}.
108+
Hazelcast offers distributed implementations of many common data structures, most of which are supported by the {java-client}.
179109

180110
When you use clients in other languages, you should review the appropriate client documentation for exceptions and details. As a general rule, you should configure these data structures on the server side and
181111
access them through a proxy on the client side.
@@ -197,8 +127,6 @@ The `addLocalEntryListener()` and `localKeySet()` methods are not supported beca
197127

198128
=== Use MultiMap
199129

200-
NOTE: This section is only applicable to the {java-client}.
201-
202130
You can use a distributed multiMap object with the {java-client}, as follows:
203131

204132
[source,java]
@@ -238,7 +166,7 @@ The logic is the same for both member and client side, so see the specific secti
238166

239167
* xref:data-structures:replicated-map.adoc[Replicated Map]
240168
* xref:data-structures:list.adoc[List]
241-
* xref:data-structures:set.adoc[Set] (not supported by {java-client-new})
169+
* xref:data-structures:set.adoc[Set]
242170
* xref:data-structures:iatomiclong.adoc[IAtomicLong]
243171
* xref:data-structures:iatomicreference.adoc[IAtomicReference]
244172
* xref:data-structures:icountdownlatch.adoc[ICountDownLatch]
@@ -507,10 +435,7 @@ security:
507435
----
508436
====
509437

510-
For more information, see the appropriate API documentation for your client:
511-
512-
* https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/config/ClientSecurityConfig.html[{java-client-new} ClientSecurityConfig API documentation]
513-
* 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]
438+
For more information, see https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/config/ClientSecurityConfig.html[ClientSecurityConfig API documentation].
514439

515440
[[classloader]]
516441
=== Configure ClassLoader
@@ -1116,6 +1041,8 @@ When an operation with sync backup is sent by a client to the Hazelcast member(s
11161041
the acknowledgment of the operation's backup is sent to the client by the backup
11171042
replica member(s). This improves the performance of the client operations.
11181043

1044+
NOTE: Backup acknowledgement is sometimes referred to as _boomerang backups_.
1045+
11191046
If using the `ALL_MEMBERS` cluster routing mode, backup acknowledgement to the client is enabled by default.
11201047
However, neither the `MULTI_MEMBER` nor the `SINGLE_MEMBER` cluster routing modes support backup acknowledgement to the client.
11211048

@@ -1661,8 +1588,6 @@ For a programmatic example, see this xref:java#programmatic-configuration-5[code
16611588

16621589
=== Configure Hazelcast {hazelcast-cloud}
16631590

1664-
NOTE: This section is only applicable to the {java-client}.
1665-
16661591
You can connect the {java-client} to a {hazelcast-cloud} Standard cluster which is hosted on link:{url-cloud-signup}[{hazelcast-cloud}].
16671592
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.
16681593
See the following example configurations:
@@ -1988,8 +1913,6 @@ NOTE: You need to restart clients after modifying system properties.
19881913
|long
19891914
|Token to use when discovering the cluster via {hazelcast-cloud}.
19901915

1991-
NOTE: Not supported by {java-client-new}.
1992-
19931916
|`hazelcast.client.concurrent.window.ms`
19941917
|100
19951918
|int
@@ -2001,8 +1924,6 @@ Setting it too high effectively disables the optimization because once concurren
20011924
it will keep that way. Setting it too low could lead to suboptimal performance because the system
20021925
will try to use write-through and other optimizations even though the system is concurrent.
20031926

2004-
NOTE: Not supported by {java-client-new}.
2005-
20061927
|`hazelcast.discovery.enabled`
20071928
|false
20081929
|bool
@@ -2168,8 +2089,6 @@ increased performance and reduced memory usage.
21682089
to the same member when this property is `true`. When it is set to `false`,
21692090
the client tries to connect to the members in the given order.
21702091

2171-
NOTE: Not supported by {java-client-new}.
2172-
21732092
|`hazelcast.client.connectivity.logging.delay.seconds`
21742093
|10
21752094
|int

0 commit comments

Comments
 (0)