Search in sources :

Example 16 with GridCommunicationClient

use of org.apache.ignite.internal.util.nio.GridCommunicationClient in project ignite by apache.

the class TcpCommunicationSpi method onContextDestroyed0.

/** {@inheritDoc} */
@Override
protected void onContextDestroyed0() {
    stopping = true;
    if (ctxInitLatch.getCount() > 0)
        // Safety.
        ctxInitLatch.countDown();
    if (connectGate != null)
        connectGate.stopped();
    // Force closing.
    for (GridCommunicationClient[] clients0 : clients.values()) {
        for (GridCommunicationClient client : clients0) {
            if (client != null)
                client.forceClose();
        }
    }
    getSpiContext().deregisterPorts();
    getSpiContext().removeLocalEventListener(discoLsnr);
}
Also used : GridCommunicationClient(org.apache.ignite.internal.util.nio.GridCommunicationClient)

Aggregations

GridCommunicationClient (org.apache.ignite.internal.util.nio.GridCommunicationClient)16 UUID (java.util.UUID)9 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)5 ClusterNode (org.apache.ignite.cluster.ClusterNode)4 IpcEndpoint (org.apache.ignite.internal.util.ipc.IpcEndpoint)4 IpcSharedMemoryServerEndpoint (org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryServerEndpoint)4 CommunicationSpi (org.apache.ignite.spi.communication.CommunicationSpi)4 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)3 GridTcpNioCommunicationClient (org.apache.ignite.internal.util.nio.GridTcpNioCommunicationClient)3 IgniteSpiException (org.apache.ignite.spi.IgniteSpiException)3 IOException (java.io.IOException)2 SocketChannel (java.nio.channels.SocketChannel)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 IgniteClientDisconnectedCheckedException (org.apache.ignite.internal.IgniteClientDisconnectedCheckedException)2 IpcOutOfSystemResourcesException (org.apache.ignite.internal.util.ipc.shmem.IpcOutOfSystemResourcesException)2 GridNioRecoveryDescriptor (org.apache.ignite.internal.util.nio.GridNioRecoveryDescriptor)2 GridNioSession (org.apache.ignite.internal.util.nio.GridNioSession)2 IgniteSpiOperationTimeoutException (org.apache.ignite.spi.IgniteSpiOperationTimeoutException)2 IgniteSpiOperationTimeoutHelper (org.apache.ignite.spi.IgniteSpiOperationTimeoutHelper)2