@@ -130,6 +130,53 @@ all the results, you could override this:
130
130
protected void complete(TarantoolPacket packet, TarantoolOp<?> future);
131
131
```
132
132
133
+ ### Client config options
134
+
135
+ The client configuration options are represented through the ` TarantoolClientConfig ` class.
136
+
137
+ Supported options are follow:
138
+
139
+ 1 . ` username ` is used to authenticate and authorize an user in a Taratool server instance.
140
+ Default value is ` null ` that means client will attempt to auth as a * guest* .
141
+ 2 . ` password ` is used to authenticate an user in a Taratool server instance.
142
+ Default value is ` null ` .
143
+ 3 . ` defaultRequestSize ` used to be an initial binary buffer size in bytes to send requests.
144
+ Default value is ` 4096 ` (4 KB).
145
+ 4 . ` predictedFutures ` is used to initialize an initial capacity of hash map which stores
146
+ response futures. The client is asynchronous under the hood even though it provides
147
+ a synchronous operations using ` java.concurrent.CompletableFuture ` .
148
+ Default value is ` (1024 * 1024) / 0.75) + 1 ` .
149
+ 5 . ` writerThreadPriority ` describes a priority of writer thread.
150
+ Default value is ` Thread.NORM_PRIORITY ` (5).
151
+ 6 . ` readerThreadPriority ` describes a priority of reader thread.
152
+ Default value is ` Thread.NORM_PRIORITY ` (5).
153
+ 7 . ` sharedBufferSize ` sets a shared buffer size in bytes (place where client collects
154
+ requests when socket is busy on write).
155
+ Default value is ` 8 * 1024 * 1024 ` (8 MB).
156
+ 8 . ` directWriteFactor ` is used as a factor to calculate a threshold whether
157
+ request will be accommodated in the shared buffer. If the request size exceeds
158
+ ` directWriteFactor * sharedBufferSize ` request is sent directly.
159
+ Defualt value is ` 0.5 ` .
160
+ 9 . ` writeTimeoutMillis ` sets the max time in ms to perform writing and send the bytes.
161
+ Default value is 60 * 1000 (1 minute).
162
+ 10 . ` useNewCall ` configures whether client has to use new * CALL* request signature or old
163
+ one used to be active in Tarantool 1.6.
164
+ Default value is ` true ` .
165
+ 11 . ` initTimeoutMillis ` sets a max time in ms to establish connection to the server
166
+ Default values is ` 60 * 1000L ` (1 minute).
167
+ 12 . ` connectionTimeout ` is a hint and can be passed to the socket providers which
168
+ implement ` ConfigurableSocketChannelProvider ` interface. This hint should be
169
+ interpreter as a connection timeout in ms per attempt where ` 0 ` means no limit.
170
+ This options restricts a time budget to perform one connection attempt, while
171
+ ` initTimeoutMillis ` limits an overall time to obtain a connection.
172
+ Default value is ` 2 * 1000 ` (2 seconds).
173
+ 13 . ` retryCount ` is a hint and can be passed to the socket providers which
174
+ implement ` ConfigurableSocketChannelProvider ` interface. This hint should be
175
+ interpreter as a maximal number of attempts to connect to Tarantool instance.
176
+ Default value is ` 3 ` .
177
+ 14 . ` operationExpiryTimeMillis ` is a default request timeout in ms.
178
+ Default value is ` 1000 ` (1 second).
179
+
133
180
## Spring NamedParameterJdbcTemplate usage example
134
181
135
182
The JDBC driver uses ` TarantoolClient ` implementation to provide a communication with server.
@@ -348,6 +395,20 @@ client.syncOps().insert(45, Arrays.asList(1, 1));
348
395
The client does its best to catch the moment when there are no pending responses
349
396
and perform a reconnection.
350
397
398
+ # ## Client config options
399
+
400
+ In addition to the options for [the standard client](# client-config-options), cluster
401
+ config provides some extra options:
402
+
403
+ 1. ` executor` defines an executor that will be used as a thread of execution to retry writes.
404
+ Default values is ` null` which means the cluster client will use * a single thread executor* .
405
+ 2. ` clusterDiscoveryEntryFunction` is a name of the stored function to be used to fetch list of
406
+ instances.
407
+ Default value is ` null` (not set).
408
+ 3. ` clusterDiscoveryDelayMillis` describes how often in ms to poll the server for a new list of
409
+ cluster nodes.
410
+ Default value is ` 60 * 1000` (1 minute).
411
+
351
412
# # Where to get help
352
413
353
414
Got problems or questions? Post them on
0 commit comments