|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.client.connection.nio.ClientConnectionManagerImpl
public class ClientConnectionManagerImpl
| Nested Class Summary | |
|---|---|
class |
ClientConnectionManagerImpl.ManagerAuthenticator
|
| Constructor Summary | |
|---|---|
ClientConnectionManagerImpl(HazelcastClientInstanceImpl client,
LoadBalancer loadBalancer,
AddressTranslator addressTranslator)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClientConnectionManagerImpl(HazelcastClientInstanceImpl client,
LoadBalancer loadBalancer,
AddressTranslator addressTranslator)
| Method Detail |
|---|
public boolean isAlive()
ClientConnectionManager
isAlive in interface ClientConnectionManagerpublic void start()
ClientConnectionManager
start in interface ClientConnectionManagerpublic void shutdown()
ClientConnectionManager
shutdown in interface ClientConnectionManagerpublic void onCloseOwnerConnection()
ClientConnectionManager
onCloseOwnerConnection in interface ClientConnectionManager
public ClientConnection ownerConnection(Address address)
throws IOException
ClientConnectionManager
ownerConnection in interface ClientConnectionManageraddress - to be connection to established
IOException
public ClientConnection connectToAddress(Address target)
throws Exception
connectToAddress in interface ClientConnectionManagerException
public ClientConnection tryToConnect(Address target)
throws Exception
ClientConnectionManager
tryToConnect in interface ClientConnectionManagertarget - hintAddress
Exception - authentication failed or no connection foundpublic String getUuid()
getUuid in interface ClientConnectionManagerpublic void onConnectionClose(ClientConnection clientConnection)
ClientConnectionManager
onConnectionClose in interface ClientConnectionManagerclientConnection - closed connectionpublic boolean removeEventHandler(Integer callId)
ClientConnectionManager
removeEventHandler in interface ClientConnectionManagercallId - of event handler registration request
public void handlePacket(Packet packet)
ClientConnectionManager
handlePacket in interface ClientConnectionManagerpacket - to be processedpublic int newCallId()
ClientConnectionManager
newCallId in interface ClientConnectionManager
public Object sendAndReceive(ClientRequest request,
ClientConnection connection)
throws Exception
ClientConnectionManager
sendAndReceive in interface ClientConnectionManagerrequest - to be sendconnection - to send the request over
Exception - if a network connection occurs or response is an exceptionpublic void removeEndpoint(Address address)
ClientConnectionManager
removeEndpoint in interface ClientConnectionManageraddress - address of the memberpublic void onDetectingUnresponsiveConnection(ClientConnection connection)
ClientConnectionManager
onDetectingUnresponsiveConnection in interface ClientConnectionManagerconnection - to be marked.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||