public class ClientConnectionManagerImpl extends Object implements ClientConnectionManager
| Modifier and Type | Class and Description |
|---|---|
class |
ClientConnectionManagerImpl.ManagerAuthenticator |
| Constructor and Description |
|---|
ClientConnectionManagerImpl(HazelcastClientInstanceImpl client,
LoadBalancer loadBalancer,
AddressTranslator addressTranslator) |
| Modifier and Type | Method and Description |
|---|---|
ClientConnection |
connectToAddress(Address target) |
String |
getUuid() |
void |
handlePacket(Packet packet)
Handles incoming network package
|
boolean |
isAlive()
Check if client connection manager is alive.
|
int |
newCallId()
Next unique call id for request
|
void |
onCloseOwnerConnection()
Called when an owner connection is closed
|
void |
onConnectionClose(ClientConnection clientConnection)
Called when an connection is closed.
|
void |
onDetectingUnresponsiveConnection(ClientConnection connection)
Called heartbeat timeout is detected on a connection.
|
ClientConnection |
ownerConnection(Address address)
Creates a new owner connection to given address
|
void |
removeEndpoint(Address address)
Called when a member left the cluster
|
boolean |
removeEventHandler(Integer callId)
Removes event handler corresponding to callId from responsible ClientConnection
|
Object |
sendAndReceive(ClientRequest request,
ClientConnection connection)
Sends request and waits for response
|
void |
shutdown()
Shutdown clientConnectionManager
|
void |
start()
Start clientConnectionManager
|
ClientConnection |
tryToConnect(Address target)
Tries to connect to an address in member list.
|
public ClientConnectionManagerImpl(HazelcastClientInstanceImpl client, LoadBalancer loadBalancer, AddressTranslator addressTranslator)
public boolean isAlive()
ClientConnectionManagerisAlive in interface ClientConnectionManagerpublic void start()
ClientConnectionManagerstart in interface ClientConnectionManagerpublic void shutdown()
ClientConnectionManagershutdown in interface ClientConnectionManagerpublic void onCloseOwnerConnection()
ClientConnectionManageronCloseOwnerConnection in interface ClientConnectionManagerpublic ClientConnection ownerConnection(Address address) throws IOException
ClientConnectionManagerownerConnection in interface ClientConnectionManageraddress - to be connection to establishedIOExceptionpublic ClientConnection connectToAddress(Address target) throws Exception
connectToAddress in interface ClientConnectionManagerExceptionpublic ClientConnection tryToConnect(Address target) throws Exception
ClientConnectionManagertryToConnect in interface ClientConnectionManagertarget - hintAddressException - authentication failed or no connection foundpublic String getUuid()
getUuid in interface ClientConnectionManagerpublic void onConnectionClose(ClientConnection clientConnection)
ClientConnectionManageronConnectionClose in interface ClientConnectionManagerclientConnection - closed connectionpublic boolean removeEventHandler(Integer callId)
ClientConnectionManagerremoveEventHandler in interface ClientConnectionManagercallId - of event handler registration requestpublic void handlePacket(Packet packet)
ClientConnectionManagerhandlePacket in interface ClientConnectionManagerpacket - to be processedpublic int newCallId()
ClientConnectionManagernewCallId in interface ClientConnectionManagerpublic Object sendAndReceive(ClientRequest request, ClientConnection connection) throws Exception
ClientConnectionManagersendAndReceive in interface ClientConnectionManagerrequest - to be sendconnection - to send the request overException - if a network connection occurs or response is an exceptionpublic void removeEndpoint(Address address)
ClientConnectionManagerremoveEndpoint in interface ClientConnectionManageraddress - address of the memberpublic void onDetectingUnresponsiveConnection(ClientConnection connection)
ClientConnectionManageronDetectingUnresponsiveConnection in interface ClientConnectionManagerconnection - to be marked.Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.