public class GridNioServerWrapper extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_CONN_PER_NODE
Deprecated.
Maximum
GridNioSession connections per node. |
| Constructor and Description |
|---|
GridNioServerWrapper(IgniteLogger log,
TcpCommunicationConfiguration cfg,
GridTimeoutProcessor timeObjProcessor,
AttributeNames attributeNames,
Tracing tracing,
Function<UUID,ClusterNode> nodeGetter,
Supplier<ClusterNode> locNodeSupplier,
ConnectGateway connectGate,
ClusterStateProvider stateProvider,
Supplier<IgniteExceptionRegistry> eRegistrySupplier,
CommunicationWorker commWorker,
IgniteConfiguration igniteCfg,
GridNioServerListener<Message> srvLsnr,
String igniteInstanceName,
WorkersRegistry workersRegistry,
@Nullable GridMetricManager metricMgr,
ThrowableBiFunction<ClusterNode,Integer,GridCommunicationClient,IgniteCheckedException> createTcpClientFun,
CommunicationListener<Message> lsnr)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Deprecated.
Clears resources for gc.
|
void |
clientPool(ConnectionClientPool pool)
Deprecated.
|
void |
communicationWorker(CommunicationWorker commWorker)
Deprecated.
|
GridNioSession |
createNioSession(ClusterNode node,
int connIdx)
Deprecated.
Returns the established TCP/IP connection between the current node and remote server.
|
GridCommunicationClient |
createTcpClient(ClusterNode node,
int connIdx,
boolean backwardCompatibility)
Deprecated.
Establish TCP connection to remote node and returns client.
|
ConcurrentMap<ConnectionKey,GridNioRecoveryDescriptor> |
inRecDescs()
Deprecated.
|
GridNioRecoveryDescriptor |
inRecoveryDescriptor(ClusterNode node,
ConnectionKey key)
Deprecated.
|
GridNioServer<Message> |
nio()
Deprecated.
Returns original nio server instance.
|
void |
nio(GridNioServer<Message> srv)
Deprecated.
|
void |
onChannelCreate(GridSelectorNioSessionImpl ses,
ConnectionKey connKey,
Message msg)
Deprecated.
|
IgniteInternalFuture<Channel> |
openChannel(ClusterNode remote,
Message initMsg)
Deprecated.
|
ConcurrentMap<ConnectionKey,GridNioRecoveryDescriptor> |
outRecDescs()
Deprecated.
|
void |
processSessionCreationError(ClusterNode node,
Collection<InetSocketAddress> addrs,
IgniteCheckedException errs)
Deprecated.
Process errors if TCP/IP
GridNioSession creation to remote node hasn't been performed. |
ConcurrentMap<ConnectionKey,GridNioRecoveryDescriptor> |
recoveryDescs()
Deprecated.
|
GridNioServer<Message> |
resetNioServer()
Deprecated.
Recreates tpcSrvr socket instance.
|
void |
socketChannelFactory(ThrowableSupplier<SocketChannel,IOException> sockChFactory)
Deprecated.
|
void |
start()
Deprecated.
Starts nio server.
|
void |
stop()
Deprecated.
Stops nio server.
|
public static final int MAX_CONN_PER_NODE
GridNioSession connections per node.public GridNioServerWrapper(IgniteLogger log, TcpCommunicationConfiguration cfg, GridTimeoutProcessor timeObjProcessor, AttributeNames attributeNames, Tracing tracing, Function<UUID,ClusterNode> nodeGetter, Supplier<ClusterNode> locNodeSupplier, ConnectGateway connectGate, ClusterStateProvider stateProvider, Supplier<IgniteExceptionRegistry> eRegistrySupplier, CommunicationWorker commWorker, IgniteConfiguration igniteCfg, GridNioServerListener<Message> srvLsnr, String igniteInstanceName, WorkersRegistry workersRegistry, @Nullable @Nullable GridMetricManager metricMgr, ThrowableBiFunction<ClusterNode,Integer,GridCommunicationClient,IgniteCheckedException> createTcpClientFun, CommunicationListener<Message> lsnr)
log - Logger.cfg - Config.timeObjProcessor - Time object processor.attributeNames - Attribute names.tracing - Tracing.nodeGetter - Node getter.locNodeSupplier - Local node supplier.connectGate - Connect gate.stateProvider - State provider.eRegistrySupplier - Exception registry supplier.commWorker - Communication worker.igniteCfg - Ignite config.srvLsnr - Server listener.igniteInstanceName - Ignite instance name.workersRegistry - Workers registry.lsnr - Listenerpublic void start()
public void stop()
public void clear()
public GridNioSession createNioSession(ClusterNode node, int connIdx) throws IgniteCheckedException
GridNioSession created.
The handshaking process contains of these steps:
SocketChannel in the blocking mode.SocketChannel.connect(SocketAddress) to remote node.NodeIdMessage.HandshakeMessage2 to remote.HandshakeMessage2 in GridNioServerListener.onMessage(GridNioSession,
Object).RecoveryLastReceivedMessage.
Note. The HandshakeTimeoutObject is created to control execution timeout during the
whole handshaking process.
node - Remote node identifier to connect with.connIdx - Connection index based on configured ConnectionPolicy.GridNioSession connection representation.IgniteCheckedException - If establish connection fails.public GridCommunicationClient createTcpClient(ClusterNode node, int connIdx, boolean backwardCompatibility) throws IgniteCheckedException
node - Remote node.connIdx - Connection index.backwardCompatibility - It calls the method from protected class.IgniteCheckedException - If failed.public GridNioServer<Message> nio()
public void nio(GridNioServer<Message> srv)
srv - Server.public GridNioRecoveryDescriptor inRecoveryDescriptor(ClusterNode node, ConnectionKey key)
node - Node.key - Connection key.public ConcurrentMap<ConnectionKey,GridNioRecoveryDescriptor> recoveryDescs()
public ConcurrentMap<ConnectionKey,GridNioRecoveryDescriptor> outRecDescs()
public ConcurrentMap<ConnectionKey,GridNioRecoveryDescriptor> inRecDescs()
public void processSessionCreationError(ClusterNode node, Collection<InetSocketAddress> addrs, IgniteCheckedException errs) throws IgniteCheckedException
GridNioSession creation to remote node hasn't been performed.node - Remote node.addrs - Remote node addresses.errs - TCP client creation errors.IgniteCheckedException - If failed.public GridNioServer<Message> resetNioServer() throws IgniteCheckedException
IgniteCheckedException - Thrown if it's not possible to create server.public void onChannelCreate(GridSelectorNioSessionImpl ses, ConnectionKey connKey, Message msg)
public IgniteInternalFuture<Channel> openChannel(ClusterNode remote, Message initMsg) throws IgniteSpiException
remote - Destination cluster node to communicate with.initMsg - Configuration channel attributes wrapped into the message.IgniteSpiException - If fails.public void communicationWorker(CommunicationWorker commWorker)
commWorker - New recovery and idle clients handler.public void clientPool(ConnectionClientPool pool)
pool - Client pool.public void socketChannelFactory(ThrowableSupplier<SocketChannel,IOException> sockChFactory)
sockChFactory - New socket channel factory.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021