Search in sources :

Example 6 with NodeImpl

use of org.apache.ignite.raft.jraft.core.NodeImpl in project ignite-3 by apache.

the class TestUtils method sender.

/**
 * Returns a message sender for this node.
 *
 * @param node The node.
 * @return The message sender.
 */
public static RpcClientEx sender(Node node) {
    NodeImpl node0 = (NodeImpl) node;
    DefaultRaftClientService rpcService = (DefaultRaftClientService) node0.getRpcClientService();
    return (RpcClientEx) rpcService.getRpcClient();
}
Also used : NodeImpl(org.apache.ignite.raft.jraft.core.NodeImpl) DefaultRaftClientService(org.apache.ignite.raft.jraft.rpc.impl.core.DefaultRaftClientService) RpcClientEx(org.apache.ignite.raft.jraft.rpc.RpcClientEx)

Aggregations

NodeImpl (org.apache.ignite.raft.jraft.core.NodeImpl)6 IgniteInternalException (org.apache.ignite.lang.IgniteInternalException)3 StateMachineAdapter (org.apache.ignite.raft.jraft.core.StateMachineAdapter)3 NodeOptions (org.apache.ignite.raft.jraft.option.NodeOptions)3 IOException (java.io.IOException)2 Files (java.nio.file.Files)2 Path (java.nio.file.Path)2 ArrayList (java.util.ArrayList)2 Comparator.comparing (java.util.Comparator.comparing)2 Iterator (java.util.Iterator)2 List (java.util.List)2 Set (java.util.Set)2 ExecutorService (java.util.concurrent.ExecutorService)2 Executors (java.util.concurrent.Executors)2 Future (java.util.concurrent.Future)2 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)2 ScheduledThreadPoolExecutor (java.util.concurrent.ScheduledThreadPoolExecutor)2 TimeUnit (java.util.concurrent.TimeUnit)2 TimeoutException (java.util.concurrent.TimeoutException)2 Consumer (java.util.function.Consumer)2