Skip to content

Commit 167e976

Browse files
committed
Add cluster feature docs
1 parent 39718dd commit 167e976

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,20 @@ tarantool> function getClusterNodes() return { 'host1', 'host2', 'host3' } end
213213
TarantoolClusterClientConfig config = new TarantoolClusterClientConfig();
214214
// fill other settings
215215
config.clusterDiscoveryEntryInstance = "10.0.0.15:3301"; // target discovery server
216-
config.clusterDiscoveryEntryFunction = "myDiscoveryFunction"; // discovery function used to fetch nodes
216+
config.clusterDiscoveryEntryFunction = "getClusterNodes"; // discovery function used to fetch nodes
217217
config.clusterDiscoveryDelayMillis = 60_000; // how often client polls the discovery server
218218
```
219219
220220
See [TarantoolClientConfig](http://tarantool.github.io/tarantool-java/apidocs/index.html?org/tarantool/TarantoolClientConfig.html)
221221
javadoc for more information.
222222
223+
3. Create a client using the config made above.
224+
225+
```java
226+
TarantoolClusterClient client = new TarantoolClusterClient(config);
227+
client.syncOps().insert(45, Arrays.asList(1, 1));
228+
```
229+
223230
#### Auto-discovery caveats
224231
225232
* You need to supply both `clusterDiscoveryEntryInstance` and `clusterDiscoveryEntryFunction`

0 commit comments

Comments
 (0)