Interface IgniteClientConfiguration
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Default background reconnect interval, in milliseconds.static final int
Default socket connect timeout, in milliseconds.static final int
Default heartbeat interval, in milliseconds.static final int
Default heartbeat timeout, in milliseconds.static final int
Default operation timeout, in milliseconds.static final int
Default port. -
Method Summary
Modifier and TypeMethodDescriptionString[]
Gets the addresses of Ignite server nodes within a cluster.Gets the address finder.@Nullable Executor
Gets the async continuation executor.@Nullable IgniteClientAuthenticator
Gets the authenticator.long
Gets the background reconnect interval, in milliseconds.@Nullable ClientCacheConfiguration
Returns the client cache configuration.long
Gets the socket connect timeout, in milliseconds.long
Gets the heartbeat message interval, in milliseconds.long
Gets the heartbeat message timeout, in milliseconds.@Nullable LoggerFactory
Returns the logger factory.boolean
Gets a value indicating whether JMX metrics are enabled.long
Gets the operation timeout, in milliseconds.@Nullable RetryPolicy
Gets the retry policy.@Nullable SslConfiguration
ssl()
Returns the client SSL configuration.
-
Field Details
-
DFLT_PORT
static final int DFLT_PORTDefault port.- See Also:
-
DFLT_CONNECT_TIMEOUT
static final int DFLT_CONNECT_TIMEOUTDefault socket connect timeout, in milliseconds.- See Also:
-
DFLT_HEARTBEAT_TIMEOUT
static final int DFLT_HEARTBEAT_TIMEOUTDefault heartbeat timeout, in milliseconds.- See Also:
-
DFLT_HEARTBEAT_INTERVAL
static final int DFLT_HEARTBEAT_INTERVALDefault heartbeat interval, in milliseconds.- See Also:
-
DFLT_BACKGROUND_RECONNECT_INTERVAL
static final long DFLT_BACKGROUND_RECONNECT_INTERVALDefault background reconnect interval, in milliseconds.- See Also:
-
DFLT_OPERATION_TIMEOUT
static final int DFLT_OPERATION_TIMEOUTDefault operation timeout, in milliseconds.- See Also:
-
-
Method Details
-
addressesFinder
IgniteClientAddressFinder addressesFinder()Gets the address finder.- Returns:
- Address finder.
-
addresses
String[] addresses()Gets the addresses of Ignite server nodes within a cluster. An address can be an IP address or a hostname, with or without port. If port is not set then Ignite will useDFLT_PORT
.Providing addresses of multiple nodes in the cluster will improve performance: Ignite will balance requests across all connections, and use partition awareness to send key-based requests directly to the primary node.
- Returns:
- Addresses.
-
retryPolicy
Gets the retry policy. When a request fails due to a connection error, and multiple server connections are available, Ignite will retry the request if the specified policy allows it.- Returns:
- Retry policy.
-
connectTimeout
long connectTimeout()Gets the socket connect timeout, in milliseconds.- Returns:
- Socket connect timeout, in milliseconds.
-
backgroundReconnectInterval
long backgroundReconnectInterval()Gets the background reconnect interval, in milliseconds. Set to0
to disable background reconnect. Default isDFLT_BACKGROUND_RECONNECT_INTERVAL
.Ignite balances requests across all healthy connections (when multiple endpoints are configured). Ignite also repairs connections on demand (when a request is made). However, "secondary" connections can be lost (due to network issues, or node restarts). This property controls how ofter Ignite client will check all configured endpoints and try to reconnect them in case of failure.
- Returns:
- Background reconnect interval, in milliseconds.
-
asyncContinuationExecutor
Gets the async continuation executor.When
null
(default),ForkJoinPool.commonPool()
is used.When async client operation completes, corresponding
CompletableFuture
continuations (such asCompletableFuture.thenApply(Function)
) will be invoked using this executor.Server responses are handled by a dedicated network thread. To ensure optimal performance, this thread should not perform any extra work, so user-defined continuations are offloaded to the specified executor.
- Returns:
- Executor for async continuations.
-
heartbeatInterval
long heartbeatInterval()Gets the heartbeat message interval, in milliseconds. Default isDFLT_HEARTBEAT_INTERVAL
.When server-side idle timeout is not zero, effective heartbeat interval is set to
min(heartbeatInterval, idleTimeout / 3)
.When thin client connection is idle (no operations are performed), heartbeat messages are sent periodically to keep the connection alive and detect potential half-open state.
- Returns:
- Heartbeat interval.
-
heartbeatTimeout
long heartbeatTimeout()Gets the heartbeat message timeout, in milliseconds. Default isDFLT_HEARTBEAT_TIMEOUT
.When a server does not respond to a heartbeat within the specified timeout, client will close the connection.
When thin client connection is idle (no operations are performed), heartbeat messages are sent periodically to keep the connection alive and detect potential half-open state.
- Returns:
- Heartbeat interval.
-
loggerFactory
Returns the logger factory. This factory will be used to create a logger instance when needed.When
null
(default),System.getLogger(java.lang.String)
is used.- Returns:
- Configured logger factory.
-
ssl
Returns the client SSL configuration. This configuration will be used to setup the SSL connection with the Ignite 3 nodes.When
null
then no SSL is used.- Returns:
- Client SSL configuration.
-
metricsEnabled
boolean metricsEnabled()Gets a value indicating whether JMX metrics are enabled. SeeIgniteClient.Builder.metricsEnabled(boolean)
for more details.- Returns:
true
if metrics are enabled.
-
authenticator
Gets the authenticator.See also:
BasicAuthenticator
.- Returns:
- Authenticator.
-
operationTimeout
long operationTimeout()Gets the operation timeout, in milliseconds. Default is0
(no timeout).An "operation" is a single client request to the server. Some public API calls may involve multiple operations, in which case the operation timeout is applied to each individual network call.
- Returns:
- Operation timeout, in milliseconds.
-
cacheConfiguration
Returns the client cache configuration.- Returns:
- Client cache configuration.
-