public class ConnectionClientPool extends Object
| Constructor and Description |
|---|
ConnectionClientPool(TcpCommunicationConfiguration cfg,
AttributeNames attrs,
IgniteLogger log,
TcpCommunicationMetricsListener metricsLsnr,
Supplier<ClusterNode> locNodeSupplier,
Function<UUID,ClusterNode> nodeGetter,
Supplier<MessageFormatter> msgFormatterSupplier,
WorkersRegistry registry,
TcpCommunicationSpi tcpCommSpi,
GridTimeoutProcessor timeObjProcessor,
ClusterStateProvider clusterStateProvider,
GridNioServerWrapper nioSrvWrapper) |
public ConnectionClientPool(TcpCommunicationConfiguration cfg, AttributeNames attrs, IgniteLogger log, TcpCommunicationMetricsListener metricsLsnr, Supplier<ClusterNode> locNodeSupplier, Function<UUID,ClusterNode> nodeGetter, Supplier<MessageFormatter> msgFormatterSupplier, WorkersRegistry registry, TcpCommunicationSpi tcpCommSpi, GridTimeoutProcessor timeObjProcessor, ClusterStateProvider clusterStateProvider, GridNioServerWrapper nioSrvWrapper)
cfg - Config.attrs - Attributes.log - Logger.metricsLsnr - Metrics listener.locNodeSupplier - Local node supplier.nodeGetter - Node getter.msgFormatterSupplier - Message formatter supplier.registry - Registry.tcpCommSpi - Tcp communication spi.timeObjProcessor - Time object processor.clusterStateProvider - Cluster state provider.nioSrvWrapper - Nio server wrapper.public void stop()
public GridCommunicationClient reserveClient(ClusterNode node, int connIdx) throws IgniteCheckedException
node - Node to which client should be open.connIdx - Connection index.IgniteCheckedException - Thrown if any exception occurs.@Nullable public @Nullable GridCommunicationClient createCommunicationClient(ClusterNode node, int connIdx) throws IgniteCheckedException
node - Node to create client for.connIdx - Connection index.IgniteCheckedException - If failed.public String clientString(GridCommunicationClient client, ClusterNode node) throws IgniteCheckedException
client - communication clientnode - cluster node to which the client tried to establish a connectionIgniteCheckedException - if failed@Nullable public @Nullable GridCommunicationClient createShmemClient(ClusterNode node, int connIdx, Integer port) throws IgniteCheckedException
node - Node.port - Port.connIdx - Connection index.IgniteCheckedException - If failed.public void addNodeClient(ClusterNode node, int connIdx, GridCommunicationClient addClient)
node - Node.connIdx - Connection index.addClient - Client to add.public boolean removeNodeClient(UUID nodeId, GridCommunicationClient rmvClient)
nodeId - Node ID.rmvClient - Client to remove.True if client was removed.public void forceCloseConnection(UUID nodeId) throws IgniteCheckedException
nodeId - Node for which to close connections.IgniteCheckedException - If occurs.public void onNodeLeft(UUID nodeId)
nodeId - Node id.public GridCommunicationClient[] clientFor(UUID id)
id - Id.public Iterable<? extends Map.Entry<UUID,GridCommunicationClient[]>> entrySet()
public void removeFut(ConnectionKey connKey, GridFutureAdapter<GridCommunicationClient> fut)
connKey - Connection key.fut - Future.public GridFutureAdapter<GridCommunicationClient> getFut(ConnectionKey connKey)
connKey - Connection key.public GridFutureAdapter<GridCommunicationClient> putIfAbsentFut(ConnectionKey key, GridFutureAdapter<GridCommunicationClient> fut)
key - Key.fut - Future.public void forceClose()
public void completeFutures(IgniteClientDisconnectedCheckedException err)
err - Err.public void metricsListener(@Nullable
@Nullable TcpCommunicationMetricsListener metricsLsnr)
metricsLsnr - New statistics.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021