public class ClientConnectionManagerImpl extends Object implements ClientConnectionManager
ClientConnectionManager
.Modifier and Type | Field and Description |
---|---|
protected boolean |
alive |
protected AtomicInteger |
connectionIdGen |
Constructor and Description |
---|
ClientConnectionManagerImpl(HazelcastClientInstanceImpl client) |
protected final AtomicInteger connectionIdGen
protected volatile boolean alive
public ClientConnectionManagerImpl(HazelcastClientInstanceImpl client)
public NioNetworking getNetworking()
protected NioNetworking initNetworking(HazelcastClientInstanceImpl client)
public ClientConnectionStrategy getConnectionStrategy()
public Collection<ClientConnection> getActiveConnections()
getActiveConnections
in interface ClientConnectionManager
public boolean isAlive()
ClientConnectionManager
isAlive
in interface ClientConnectionManager
public void start()
protected void startNetworking()
public void shutdown()
public ClientPrincipal getPrincipal()
getPrincipal
in interface ClientConnectionManager
protected void stopNetworking()
public Connection getActiveConnection(Address target)
getActiveConnection
in interface ClientConnectionManager
target
- to be connectedpublic Connection getOrConnect(Address address) throws IOException
getOrConnect
in interface ClientConnectionManager
address
- to be connectedIOException
- if connection is not establishedpublic Connection getOrTriggerConnect(Address target, boolean acquiresResources) throws IOException
getOrTriggerConnect
in interface ClientConnectionManager
target
- to be connectedIOException
- if connection is not able to triggeredpublic Address getOwnerConnectionAddress()
getOwnerConnectionAddress
in interface ClientConnectionManager
public Connection getOrConnect(Address address, boolean asOwner)
public ClientConnection getOwnerConnection()
getOwnerConnection
in interface ClientConnectionManager
protected ClientConnection createSocketConnection(Address remoteAddress) throws IOException
IOException
public void addConnectionListener(ConnectionListener connectionListener)
ConnectionListenable
addConnectionListener
in interface ConnectionListenable
connectionListener
- the ConnectionListener to add.public Credentials getLastCredentials()
public void setCandidateClusterContext(CandidateClusterContext context)
setCandidateClusterContext
in interface ClientConnectionManager
public void beforeClusterSwitch(CandidateClusterContext context)
beforeClusterSwitch
in interface ClientConnectionManager
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.