public class ClientConnectionManagerImpl extends Object implements ClientConnectionManager, com.hazelcast.client.spi.impl.ConnectionHeartbeatListener
ClientConnectionManager.| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | alive | 
| protected AtomicInteger | connectionIdGen | 
| Constructor and Description | 
|---|
| ClientConnectionManagerImpl(com.hazelcast.client.impl.HazelcastClientInstanceImpl client,
                           AddressTranslator addressTranslator,
                           Collection<AddressProvider> addressProviders) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addConnectionHeartbeatListener(com.hazelcast.client.spi.impl.ConnectionHeartbeatListener connectionHeartbeatListener) | 
| void | addConnectionListener(ConnectionListener connectionListener)Registers a ConnectionListener. | 
| void | connectToCluster() | 
| Future<Void> | connectToClusterAsync() | 
| protected ClientConnection | createSocketConnection(Address address) | 
| Connection | getActiveConnection(Address target) | 
| Collection<ClientConnection> | getActiveConnections() | 
| com.hazelcast.internal.networking.nio.NioEventLoopGroup | getEventLoopGroup() | 
| Connection | getOrConnect(Address address) | 
| Connection | getOrTriggerConnect(Address target,
                   boolean acquiresResources) | 
| ClientConnection | getOwnerConnection() | 
| Address | getOwnerConnectionAddress() | 
| com.hazelcast.client.impl.client.ClientPrincipal | getPrincipal() | 
| void | heartbeatResumed(Connection connection)This event will be fired when the heartbeat is resumed for a connection to a member. | 
| void | heartbeatStopped(Connection connection)This event will be fired when no heartbeat response is received for
  ClientProperty.HEARTBEAT_TIMEOUTmilliseconds from the member. | 
| protected com.hazelcast.internal.networking.nio.NioEventLoopGroup | initEventLoopGroup(com.hazelcast.client.impl.HazelcastClientInstanceImpl client) | 
| boolean | isAlive()Check if client connection manager is alive. | 
| void | shutdown() | 
| void | start(ClientContext clientContext) | 
| protected void | startEventLoopGroup() | 
| protected void | stopEventLoopGroup() | 
protected final AtomicInteger connectionIdGen
protected volatile boolean alive
public ClientConnectionManagerImpl(com.hazelcast.client.impl.HazelcastClientInstanceImpl client,
                                   AddressTranslator addressTranslator,
                                   Collection<AddressProvider> addressProviders)
public com.hazelcast.internal.networking.nio.NioEventLoopGroup getEventLoopGroup()
protected com.hazelcast.internal.networking.nio.NioEventLoopGroup initEventLoopGroup(com.hazelcast.client.impl.HazelcastClientInstanceImpl client)
public Collection<ClientConnection> getActiveConnections()
getActiveConnections in interface ClientConnectionManagerpublic boolean isAlive()
ClientConnectionManagerisAlive in interface ClientConnectionManagerpublic void start(ClientContext clientContext)
protected void startEventLoopGroup()
public void shutdown()
public com.hazelcast.client.impl.client.ClientPrincipal getPrincipal()
getPrincipal in interface ClientConnectionManagerprotected void stopEventLoopGroup()
public Connection getActiveConnection(Address target)
getActiveConnection in interface ClientConnectionManagertarget - to be connectedpublic Connection getOrConnect(Address address) throws IOException
getOrConnect in interface ClientConnectionManageraddress - to be connectedIOException - if connection is not establishedpublic Connection getOrTriggerConnect(Address target, boolean acquiresResources) throws IOException
getOrTriggerConnect in interface ClientConnectionManagertarget - to be connectedIOException - if connection is not able to triggeredpublic Address getOwnerConnectionAddress()
getOwnerConnectionAddress in interface ClientConnectionManagerpublic ClientConnection getOwnerConnection()
getOwnerConnection in interface ClientConnectionManagerprotected ClientConnection createSocketConnection(Address address) throws IOException
IOExceptionpublic void addConnectionListener(ConnectionListener connectionListener)
ConnectionListenableaddConnectionListener in interface ConnectionListenableconnectionListener - the ConnectionListener to add.public void addConnectionHeartbeatListener(com.hazelcast.client.spi.impl.ConnectionHeartbeatListener connectionHeartbeatListener)
addConnectionHeartbeatListener in interface ClientConnectionManagerpublic void heartbeatResumed(Connection connection)
com.hazelcast.client.spi.impl.ConnectionHeartbeatListenerheartbeatResumed in interface com.hazelcast.client.spi.impl.ConnectionHeartbeatListenerpublic void heartbeatStopped(Connection connection)
com.hazelcast.client.spi.impl.ConnectionHeartbeatListenerClientProperty.HEARTBEAT_TIMEOUT milliseconds from the member.heartbeatStopped in interface com.hazelcast.client.spi.impl.ConnectionHeartbeatListenerpublic void connectToCluster()
connectToCluster in interface ClientConnectionManagerpublic Future<Void> connectToClusterAsync()
connectToClusterAsync in interface ClientConnectionManagerCopyright © 2018 Hazelcast, Inc.. All rights reserved.