Java Client

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Method Arguments Description Default Key|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `setUsername(String username)` `username` - username for authentication Sets username for an authentication method that is selected by further configuration `default` `user`| `setPassword(String password)` `password` - secret value Sets a secret for password authentication and effectively selects as authentication method - `password`| `setAccessToken(String accessToken)` `accessToken` - access token string Sets an access token to authenticate with a sets corresponding authentication method - `access_token`| `useSSLAuthentication(boolean useSSLAuthentication)` `useSSLAuthentication` - flag to enable SSL auth Sets SSL Client Certificate as an authentication method. - `ssl_authentication`| `useHTTPBasicAuth(boolean useBasicAuth)` `useBasicAuth` - flag to enable/disable Sets if basic HTTP authentication should be used for user-password authentication. Resolves issues with passwords containing special characters. `true` `http_use_basic_auth`| `useBearerTokenAuth(String bearerToken)` `bearerToken` - an encoded bearer token Specifies whether to use Bearer Authentication and what token to use. The token will be sent as is. - `bearer_token` | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Method Arguments Description Default Key|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `setConnectTimeout(long timeout, ChronoUnit unit)` `timeout` - timeout value `unit` - time unit Sets connection initiation timeout for any outgoing connection. - `connection_timeout`| `setConnectionRequestTimeout(long timeout, ChronoUnit unit)` `timeout` - timeout value `unit` - time unit Sets connection request timeout. This take effect only for getting connection from a pool. `10000` `connection_request_timeout`| `setSocketTimeout(long timeout, ChronoUnit unit)` `timeout` - timeout value `unit` - time unit Sets socket timeout that affects read and write operations `0` `socket_timeout`| `setExecutionTimeout(long timeout, ChronoUnit timeUnit)` `timeout` - timeout value `timeUnit` - time unit Sets maximum execution timeout for queries `0` `max_execution_time`| `retryOnFailures(ClientFaultCause ...causes)` `causes` - enum constant of `ClientFaultCause` Sets recoverable/retriable fault types. `NoHttpResponse` `ConnectTimeout` `ConnectionRequestTimeout` `client_retry_on_failures`| `setMaxRetries(int maxRetries)` `maxRetries` - number of retries Sets maximum number of retries for failures defined by `retryOnFailures` `3` `retry` | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Method Arguments Description Default Key|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `setSocketRcvbuf(long size)` `size` - size in bytes Sets TCP socket receive buffer. This buffer out of the JVM memory. `8196` `socket_rcvbuf`| `setSocketSndbuf(long size)` `size` - size in bytes Sets TCP socket send buffer. This buffer out of the JVM memory. `8196` `socket_sndbuf`| `setSocketKeepAlive(boolean value)` `value` - flag to enable/disable Sets option `SO_KEEPALIVE` for every TCP socket. TCP Keep Alive enables mechanism that will check liveness of the connection. - `socket_keepalive`| `setSocketTcpNodelay(boolean value)` `value` - flag to enable/disable Sets option `SO_NODELAY` for every TCP socket. This TCP option will make socket to push data as soon as possible. - `socket_tcp_nodelay`| `setSocketLinger(int secondsToWait)` `secondsToWait` - number of seconds Set linger time for every TCP socket created by the client. - `socket_linger` | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Method Arguments Description Default Key|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `compressServerResponse(boolean enabled)` `enabled` - flag to enable/disable Sets if server should compress its responses. `true` `compress`| `compressClientRequest(boolean enabled)` `enabled` - flag to enable/disable Sets if client should compress its requests. `false` `decompress`| `useHttpCompression(boolean enabled)` `enabled` - flag to enable/disable Sets if HTTP compression should be used for client/server communications if corresponding options are enabled - -|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `appCompressedData(boolean enabled)` `enabled` - flag to enable/disable Tell client that compression will be handled by application. `false` `app_compressed_data`| `setLZ4UncompressedBufferSize(int size)` `size` - size in bytes Sets size of a buffer that will receive uncompressed portion of a data stream. `65536` `compression.lz4.uncompressed_buffer_size`| `disableNativeCompression` `disable` - flag to disable Disable native compression. If set to true then native compression will be disabled. `false` `disable_native_compression` | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |