com.hazelcast.client.connection.nio

## Class ClusterConnectorServiceImpl

- java.lang.Object
- - com.hazelcast.client.connection.nio.ClusterConnectorServiceImpl

- All Implemented Interfaces:
    ClusterConnectorService, ConnectionListener

      public class ClusterConnectorServiceImpl
      extends Object
      implements ClusterConnectorService, ConnectionListener

  Helper to ClientConnectionManager. Implemented in this class: selecting owner connection, connecting and disconnecting from the cluster.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClusterConnectorServiceImpl(com.hazelcast.client.impl.clientside.HazelcastClientInstanceImpl client, ClientConnectionManagerImpl connectionManager, ClientConnectionStrategy connectionStrategy, com.hazelcast.client.impl.clientside.ClientDiscoveryService discoveryService)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `connectionAdded(Connection connection)`
    `void` | `connectionRemoved(Connection connection)`
    `void` | `connectToCluster()`
    `Future<Void>` | `connectToClusterAsync()`
    `Address` | `getOwnerConnectionAddress()`
    `boolean` | `isClusterAvailable()`
    `void` | `setOwnerConnectionAddress(Address ownerConnectionAddress)`
    `void` | `shutdown()`

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

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

- - ### Constructor Detail

    - #### ClusterConnectorServiceImpl

          public ClusterConnectorServiceImpl(com.hazelcast.client.impl.clientside.HazelcastClientInstanceImpl client,
                                             ClientConnectionManagerImpl connectionManager,
                                             ClientConnectionStrategy connectionStrategy,
                                             com.hazelcast.client.impl.clientside.ClientDiscoveryService discoveryService)

  - ### Method Detail

    - #### connectToCluster

          public void connectToCluster()

      Specified by:
        `connectToCluster` in interface `ClusterConnectorService`

    - #### isClusterAvailable

          public boolean isClusterAvailable()

      Specified by:
        `isClusterAvailable` in interface `ClusterConnectorService`

    - #### getOwnerConnectionAddress

          public Address getOwnerConnectionAddress()

    - #### setOwnerConnectionAddress

          public void setOwnerConnectionAddress(Address ownerConnectionAddress)

    - #### connectToClusterAsync

          public Future<Void> connectToClusterAsync()

      Specified by:
        `connectToClusterAsync` in interface `ClusterConnectorService`

    - #### shutdown

          public void shutdown()

      Specified by:
        `shutdown` in interface `ClusterConnectorService`

    - #### connectionAdded

          public void connectionAdded(Connection connection)

      Specified by:
        `connectionAdded` in interface `ConnectionListener`

    - #### connectionRemoved

          public void connectionRemoved(Connection connection)

      Specified by:
        `connectionRemoved` in interface `ConnectionListener`

Copyright © 2020. All rights reserved.