public Object lock() {
        if (this.destroyed) {
            return null;
        }
        this.lock.lock();
        // Got the lock, double checking state.
        if (this.destroyed) {
            // should release lock
            this.lock.unlock();
            return null;
        }
        return this.data;
    }
Error callback, it will be called in lock.

@param id        the thread id
@param data      the data
@param errorCode the error code
jraft-core/src/main/java/com/alipay/sofa/jraft/util/ThreadId.java