Interface IgniteClientConfiguration


public interface IgniteClientConfiguration
Ignite client configuration.
  • Field Details

    • DFLT_PORT

      static final int DFLT_PORT
      Default port.
      See Also:
    • DFLT_CONNECT_TIMEOUT

      static final int DFLT_CONNECT_TIMEOUT
      Default socket connect timeout, in milliseconds.
      See Also:
    • DFLT_HEARTBEAT_TIMEOUT

      static final int DFLT_HEARTBEAT_TIMEOUT
      Default heartbeat timeout, in milliseconds.
      See Also:
    • DFLT_HEARTBEAT_INTERVAL

      static final int DFLT_HEARTBEAT_INTERVAL
      Default heartbeat interval, in milliseconds.
      See Also:
    • DFLT_BACKGROUND_RECONNECT_INTERVAL

      static final long DFLT_BACKGROUND_RECONNECT_INTERVAL
      Default background reconnect interval, in milliseconds.
      See Also:
    • DFLT_OPERATION_TIMEOUT

      static final int DFLT_OPERATION_TIMEOUT
      Default 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 use DFLT_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

      @Nullable @Nullable RetryPolicy 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 to 0 to disable background reconnect. Default is DFLT_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

      @Nullable @Nullable Executor asyncContinuationExecutor()
      Gets the async continuation executor.

      When null (default), ForkJoinPool.commonPool() is used.

      When async client operation completes, corresponding CompletableFuture continuations (such as CompletableFuture.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 is DFLT_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 is DFLT_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

      @Nullable @Nullable LoggerFactory 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

      @Nullable @Nullable SslConfiguration 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. See IgniteClient.Builder.metricsEnabled(boolean) for more details.
      Returns:
      true if metrics are enabled.
    • authenticator

      @Nullable @Nullable IgniteClientAuthenticator authenticator()
      Gets the authenticator.

      See also: BasicAuthenticator.

      Returns:
      Authenticator.
    • operationTimeout

      long operationTimeout()
      Gets the operation timeout, in milliseconds. Default is 0 (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

      @Nullable @Nullable ClientCacheConfiguration cacheConfiguration()
      Returns the client cache configuration.
      Returns:
      Client cache configuration.