|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 ClientConnectionManager
public void start()
ClientConnectionManager
start
in interface ClientConnectionManager
public void shutdown()
ClientConnectionManager
shutdown
in interface ClientConnectionManager
public void onCloseOwnerConnection()
ClientConnectionManager
onCloseOwnerConnection
in interface ClientConnectionManager
public ClientConnection ownerConnection(Address address) throws IOException
ClientConnectionManager
ownerConnection
in interface ClientConnectionManager
address
- to be connection to established
IOException
public ClientConnection connectToAddress(Address target) throws Exception
connectToAddress
in interface ClientConnectionManager
Exception
public ClientConnection tryToConnect(Address target) throws Exception
ClientConnectionManager
tryToConnect
in interface ClientConnectionManager
target
- hintAddress
Exception
- authentication failed or no connection foundpublic String getUuid()
getUuid
in interface ClientConnectionManager
public void onConnectionClose(ClientConnection clientConnection)
ClientConnectionManager
onConnectionClose
in interface ClientConnectionManager
clientConnection
- closed connectionpublic boolean removeEventHandler(Integer callId)
ClientConnectionManager
removeEventHandler
in interface ClientConnectionManager
callId
- of event handler registration request
public void handlePacket(Packet packet)
ClientConnectionManager
handlePacket
in interface ClientConnectionManager
packet
- to be processedpublic int newCallId()
ClientConnectionManager
newCallId
in interface ClientConnectionManager
public Object sendAndReceive(ClientRequest request, ClientConnection connection) throws Exception
ClientConnectionManager
sendAndReceive
in interface ClientConnectionManager
request
- 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 ClientConnectionManager
address
- address of the memberpublic void onDetectingUnresponsiveConnection(ClientConnection connection)
ClientConnectionManager
onDetectingUnresponsiveConnection
in interface ClientConnectionManager
connection
- to be marked.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |