@Override
    public boolean init(final Void opts) {
        if (!this.started.compareAndSet(false, true)) {
            throw new IllegalStateException("grpc server has started");
        }

        this.defaultExecutor = ThreadPoolUtil.newBuilder() //
            .poolName(EXECUTOR_NAME) //
            .enableMetric(true) //
            .coreThreads(Math.min(20, GrpcRaftRpcFactory.RPC_SERVER_PROCESSOR_POOL_SIZE / 5)) //
            .maximumThreads(GrpcRaftRpcFactory.RPC_SERVER_PROCESSOR_POOL_SIZE) //
            .keepAliveSeconds(60L) //
            .workQueue(new SynchronousQueue<>()) //
            .threadFactory(new NamedThreadFactory(EXECUTOR_NAME + "-", true)) //
            .rejectedHandler((r, executor) -> {
                throw new RejectedExecutionException("[" + EXECUTOR_NAME + "], task " + r.toString() +
                        " rejected from " +
                        executor.toString());
            })
            .build();

        try {
            this.server.start();
        } catch (final IOException e) {
            ThrowUtil.throwException(e);
        }
        return true;
    }
GRPC RPC server implement.

@author nicholas.jxf
@author jiachun.fjc
jraft-extension/rpc-grpc-impl/src/main/java/com/alipay/sofa/jraft/rpc/impl/GrpcServer.java