Search in sources :

Example 1 with CliClientService

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();
}
Also used : CliServiceImpl(com.alipay.sofa.jraft.core.CliServiceImpl) CliOptions(com.alipay.sofa.jraft.option.CliOptions) CliClientService(com.alipay.sofa.jraft.rpc.CliClientService)

Aggregations

CliServiceImpl (com.alipay.sofa.jraft.core.CliServiceImpl)1 CliOptions (com.alipay.sofa.jraft.option.CliOptions)1 CliClientService (com.alipay.sofa.jraft.rpc.CliClientService)1