class AbstractReplicatedLogImpl implements ReplicatedLog {

    @Override
    public void snapshotPreCommit(long snapshotCapturedIndex, long snapshotCapturedTerm) {
        Preconditions.checkArgument(snapshotCapturedIndex >= snapshotIndex,
                "snapshotCapturedIndex must be greater than or equal to snapshotIndex");

        snapshottedJournal = new ArrayList<>(journal.size());

        List<ReplicatedLogEntry> snapshotJournalEntries =
                journal.subList(0, (int) (snapshotCapturedIndex - snapshotIndex));

        snapshottedJournal.addAll(snapshotJournalEntries);
        snapshotJournalEntries.clear();

        previousSnapshotIndex = snapshotIndex;
        setSnapshotIndex(snapshotCapturedIndex);

        previousSnapshotTerm = snapshotTerm;
        setSnapshotTerm(snapshotCapturedTerm);
    }

    protected  AbstractReplicatedLogImpl(long snapshotIndex, long snapshotTerm,
            List<ReplicatedLogEntry> unAppliedEntries, String logContext);
    protected  AbstractReplicatedLogImpl();

}