private boolean isHeartbeatRequest(final AppendEntriesRequest request) {
        // No entries and no data means a true heartbeat request.
        // TODO(boyan) refactor, adds a new flag field?
        return request.getEntriesCount() == 0 && !request.hasData();
    }
The executor selector to select executor for processing request.
jraft-core/src/main/java/com/alipay/sofa/jraft/rpc/impl/core/AppendEntriesRequestProcessor.java