public void setResult(R result) {
        this.lock.lock();
        try {
            this.result = result;
            notifyHaveResult();
        } finally {
            this.lock.unlock();
        }
    }
Set the result value and notify about operation completion.

@param result
           the result value
jraft-core/src/main/java/com/alipay/sofa/jraft/rpc/impl/FutureImpl.java