Public Member Functions

GridGain.Client.Impl.GridClientConnectionManager Class Reference

Connections manager. More...

List of all members.

Public Member Functions

 GridClientConnectionManager (Guid clientId, GridClientTopology top, ICollection< IPEndPoint > routers, Object credentials, GridClientProtocol proto, IGridClientSslContext sslCtx, int connectTimeout)
 Constructs connection manager.
C connection (IGridClientNode node)
 Gets active communication facade.
C connection (ICollection< IPEndPoint > srvs)
 Gets active communication facade.
void onFacadeFailed (IGridClientNode node, C conn, GridClientConnectionResetException e)
 Handles communication connection failure. Tries to reconnect to any of the servers specified and throws an exception if none of the servers can be reached.
void closeAll (bool waitCompletion)
 Closes all opened connections.
void closeIdle (TimeSpan timeout)
 Close all idle connections more then "timeout" milliseconds.

Detailed Description


Constructor & Destructor Documentation

GridGain.Client.Impl.GridClientConnectionManager.GridClientConnectionManager ( Guid  clientId,
GridClientTopology  top,
ICollection< IPEndPoint >  routers,
Object  credentials,
GridClientProtocol  proto,
IGridClientSslContext  sslCtx,
int  connectTimeout 
)
Parameters:
clientId Client ID.
top Topology.
routers Routers or empty collection to use endpoints from topology info.
credentials Connection credentials.
proto Connection protocol.
sslCtx SSL context to enable secured connection or null to use unsecured one.
connectTimeout TCP connection timeout.

Member Function Documentation

void GridGain.Client.Impl.GridClientConnectionManager.closeAll ( bool  waitCompletion  ) 
Parameters:
waitCompletion If true will wait for all pending requests to be proceeded.
void GridGain.Client.Impl.GridClientConnectionManager.closeIdle ( TimeSpan  timeout  ) 
Parameters:
timeout Idle timeout in ms.
C GridGain.Client.Impl.GridClientConnectionManager.connection ( ICollection< IPEndPoint >  srvs  ) 
Parameters:
srvs Remote nodes to which connection should be established.
Returns:
Communication facade.
Exceptions:
GridClientServerUnreachableException If none of the servers can be reached after the exception.
GridClientClosedException If client was closed manually.
C GridGain.Client.Impl.GridClientConnectionManager.connection ( IGridClientNode  node  ) 
Parameters:
node Remote node to which connection should be established.
Returns:
Communication facade.
Exceptions:
GridClientServerUnreachableException If none of the servers can be reached after the exception.
GridClientClosedException If client was closed manually.
void GridGain.Client.Impl.GridClientConnectionManager.onFacadeFailed ( IGridClientNode  node,
C  conn,
GridClientConnectionResetException  e 
)
Parameters:
node Remote node for which this connection belongs to.
conn Facade that caused the exception.
e Exception.