com.hazelcast.client.config

## Class ClientConnectionStrategyConfig

- java.lang.Object
- - com.hazelcast.client.config.ClientConnectionStrategyConfig

-     public class ClientConnectionStrategyConfig
      extends Object

  Client connection strategy configuration is used for setting custom strategies and configuring strategy parameters.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ClientConnectionStrategyConfig.ReconnectMode` Reconnect options.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientConnectionStrategyConfig()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClientConnectionStrategyConfig.ReconnectMode` | `getReconnectMode()`
    `boolean` | `isAsyncStart()` Client instance creation won't block on `HazelcastClient.newHazelcastClient()` if this value is true
    `ClientConnectionStrategyConfig` | `setAsyncStart(boolean asyncStart)` Set true for non blocking `HazelcastClient.newHazelcastClient()`.
    `ClientConnectionStrategyConfig` | `setReconnectMode(ClientConnectionStrategyConfig.ReconnectMode reconnectMode)` How a client reconnect to cluster after a disconnect can be configured.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClientConnectionStrategyConfig

          public ClientConnectionStrategyConfig()

  - ### Method Detail

    - #### isAsyncStart

          public boolean isAsyncStart()

      Client instance creation won't block on `HazelcastClient.newHazelcastClient()` if this value is true
      Returns:
        if client connects to cluster asynchronously

    - #### setAsyncStart

          public ClientConnectionStrategyConfig setAsyncStart(boolean asyncStart)

      Set true for non blocking `HazelcastClient.newHazelcastClient()`. The client creation won't wait to connect to cluster. The client instace will throw exception until it connects to cluster and become ready. If set to false, `HazelcastClient.newHazelcastClient()` will block until a cluster connection established and it's ready to use client instance default value is false
      Parameters:
        `asyncStart` - true for async client creation
      Returns:
        the updated ClientConnectionStrategyConfig

    - #### getReconnectMode

          public ClientConnectionStrategyConfig.ReconnectMode getReconnectMode()

      Returns:
        reconnect mode

    - #### setReconnectMode

          public ClientConnectionStrategyConfig setReconnectMode(ClientConnectionStrategyConfig.ReconnectMode reconnectMode)

      How a client reconnect to cluster after a disconnect can be configured. This parameter is used by default strategy and custom implementations may ignore it if configured. default value is `ClientConnectionStrategyConfig.ReconnectMode.ON`
      Parameters:
        `reconnectMode` -
      Returns:

Copyright © 2018. All rights reserved.