class FollowerLogInformation {

    public boolean okToReplicate(final long commitIndex) {
        if (peerInfo.getVotingState() == VotingState.VOTING_NOT_INITIALIZED) {
            return false;
        }

        // Return false if we are trying to send duplicate data before the heartbeat interval. This check includes
        // also our commitIndex, as followers need to be told of new commitIndex as soon as possible.
        if (getNextIndex() == lastReplicatedIndex && !hasStaleCommitIndex(commitIndex)
                && lastReplicatedStopwatch.elapsed(TimeUnit.MILLISECONDS)
                < context.getConfigParams().getHeartBeatInterval().toMillis()) {
            return false;
        }

        resetLastReplicated();
        return true;
    }

    @VisibleForTesting  FollowerLogInformation(final PeerInfo peerInfo, final long matchIndex, final RaftActorContext context);
    public  FollowerLogInformation(final PeerInfo peerInfo, final RaftActorContext context);

}