public OptionalInt latestEpoch() {
        Optional<EpochEntry> entry = latestEntry();
        return entry.isPresent() ? OptionalInt.of(entry.get().epoch) : OptionalInt.empty();
    }
Returns the current Leader Epoch if one exists. This is the latest epoch
which has messages assigned to it.
storage/src/main/java/org/apache/kafka/storage/internals/epoch/LeaderEpochFileCache.java