@Override
    public long checkRecord(final long location) {
        long result = 0;
        for (final Entry<Severity, StoredErrorStats> entry : statsMap.entrySet()) {
            final Severity severity = entry.getKey();
            final StoredErrorStats storedErrorStats = entry.getValue();
            final long currentCount = storedErrorStats.checkRecord();
            if (severity.greaterThanOrEqual(Severity.ERROR)) {
                result += currentCount;
            }
        }

        return result;
    }
Flags records that contain errors so that the RecordOutputFilter can exclude
them from the output.
stroom-pipeline/src/main/java/stroom/pipeline/errorhandler/RecordErrorReceiver.java