Search in sources :

Example 1 with TcpCommunicationConnectionCheckFuture

use of org.apache.ignite.spi.communication.tcp.internal.TcpCommunicationConnectionCheckFuture in project ignite by apache.

the class TcpCommunicationSpi method checkConnection.

/**
 * @param nodes Nodes to check connection with.
 * @return Result future (each bit in result BitSet contains connection status to corresponding node).
 */
public IgniteFuture<BitSet> checkConnection(List<ClusterNode> nodes) {
    TcpCommunicationConnectionCheckFuture fut = new TcpCommunicationConnectionCheckFuture(this, log.getLogger(TcpCommunicationConnectionCheckFuture.class), nioSrvWrapper.nio(), nodes);
    long timeout = failureDetectionTimeoutEnabled() ? failureDetectionTimeout() : cfg.connectionTimeout();
    if (log.isInfoEnabled())
        log.info("Start check connection process [nodeCnt=" + nodes.size() + ", timeout=" + timeout + ']');
    fut.init(timeout);
    return new IgniteFutureImpl<>(fut);
}
Also used : IgniteFutureImpl(org.apache.ignite.internal.util.future.IgniteFutureImpl) TcpCommunicationConnectionCheckFuture(org.apache.ignite.spi.communication.tcp.internal.TcpCommunicationConnectionCheckFuture)

Aggregations

IgniteFutureImpl (org.apache.ignite.internal.util.future.IgniteFutureImpl)1 TcpCommunicationConnectionCheckFuture (org.apache.ignite.spi.communication.tcp.internal.TcpCommunicationConnectionCheckFuture)1