@@ -130,6 +130,51 @@ 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 . ` initTimeoutMilli ` 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
+ Default value is ` 2 * 1000 ` (2 seconds).
171
+ 13 . ` retryCount ` is a hint and can be passed to the socket providers which
172
+ implement ` ConfigurableSocketChannelProvider ` interface. This hint should be
173
+ interpreter as a maximal number of attempts to connect to Tarantool instance.
174
+ Default value is ` 3 ` .
175
+ 14 . ` operationExpiryTimeMillis ` is a default request timeout in ms.
176
+ Default value is ` 1000 ` (1 second).
177
+
133
178
## Spring NamedParameterJdbcTemplate usage example
134
179
135
180
The JDBC driver uses ` TarantoolClient ` implementation to provide a communication with server.
@@ -348,6 +393,20 @@ client.syncOps().insert(45, Arrays.asList(1, 1));
348
393
The client does its best to catch the moment when there are no pending responses
349
394
and perform a reconnection.
350
395
396
+ # ## Client config options
397
+
398
+ In addition to the options for [the standard client](# client-config-options), cluster
399
+ config provides some extra options:
400
+
401
+ 1. ` executor` defines an executor that will be used as a thread of execution to retry writes.
402
+ Default values is ` null` which means the cluster client will use * a single thread executor* .
403
+ 2. ` clusterDiscoveryEntryFunction` is a name of the stored function to be used to fetch list of
404
+ instances.
405
+ Default value is ` null` (not set).
406
+ 3. ` clusterDiscoveryDelayMillis` describes how often in ms to poll the server for a new list of
407
+ cluster nodes.
408
+ Default value is ` 60 * 1000` (1 minute).
409
+
351
410
# # Where to get help
352
411
353
412
Got problems or questions? Post them on
0 commit comments