public static void sendHeartbeat(final ThreadId id, final RpcResponseClosure<AppendEntriesResponse> closure) {
        final Replicator r = (Replicator) id.lock();
        if (r == null) {
            RpcUtils.runClosureInThread(closure, new Status(RaftError.EHOSTDOWN, "Peer %s is not connected", id));
            return;
        }
        //id unlock in send empty entries.
        r.sendEmptyEntries(true, closure);
    }
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