private void checkAndSetConfiguration(final boolean inLock) {
        if (!inLock) {
            this.writeLock.lock();
        }
        try {
            final ConfigurationEntry prevConf = this.conf;
            this.conf = this.logManager.checkAndSetConfiguration(prevConf);

            if (this.conf != prevConf) {
                // Update target priority value
                final int prevTargetPriority = this.targetPriority;
                this.targetPriority = getMaxPriorityOfNodes(this.conf.getConf().getPeers());
                if (prevTargetPriority != this.targetPriority) {
                    LOG.info("Node {} target priority value has changed from: {}, to: {}.", getNodeId(),
                        prevTargetPriority, this.targetPriority);
                }
                this.electionTimeoutCounter = 0;
            }
        } finally {
            if (!inLock) {
                this.writeLock.unlock();
            }
        }
    }
Check and set configuration for node.At the same time, if configuration is changed,
then compute and update the target priority value.

@param inLock whether the writeLock has already been locked in other place.
jraft-core/src/main/java/com/alipay/sofa/jraft/core/NodeImpl.java