public static long getNextIndex(final ThreadId id) {
        final Replicator r = (Replicator) id.lock();
        if (r == null) {
            return 0;
        }
        long nextIdx = 0;
        if (r.hasSucceeded) {
            nextIdx = r.nextIndex;
        }
        id.unlock();
        return nextIdx;
    }
Send log entries to follower, returns true when success, otherwise false and unlock the id.

@param nextSendingIndex next sending index
@return send result.
jraft-core/src/main/java/com/alipay/sofa/jraft/core/Replicator.java