use of com.alipay.sofa.jraft.rpc.CliClientService in project sofa-jraft by sofastack.
the class DefaultRheaKVCliService method initCli.
private void initCli(CliOptions cliOpts) {
if (cliOpts == null) {
cliOpts = new CliOptions();
cliOpts.setTimeoutMs(5000);
cliOpts.setMaxRetry(3);
}
this.opts = cliOpts;
this.cliService = RaftServiceFactory.createAndInitCliService(cliOpts);
final CliClientService cliClientService = ((CliServiceImpl) this.cliService).getCliClientService();
Requires.requireNonNull(cliClientService, "cliClientService");
this.rpcClient = ((AbstractClientService) cliClientService).getRpcClient();
}
Aggregations