class PersistentFiltersJob implements Runnable {

    @Override
    public void run() {
        // synchronized on an instance of a class only to prevent several PersistentFiltersJob to
        // access on the same filterUpdateTimesCounter. It's not mean to and can't prevent thread
        // not in PersistentFiltersJob to access this counter
        synchronized (filterUpdateTimesCounter) {
            final long sum = filterUpdateTimesCounter.sum();
            if (sum > criteria.updatesThreshold()) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Updated {} times in last {} seconds meets threshold {} to persistence filters",
                            sum, criteria.checkingPeriod().getSeconds(), criteria.updatesThreshold());
                }

                filterUpdateTimesCounter.reset();
                doPersistence();
            }
        }
    }

      PersistentFiltersJob(BloomFilterManager<F, ?> bloomFilterManager,
                         PersistentManager<F> persistentManager,
                         LongAdder filterUpdateTimesCounter,
                         TriggerPersistenceCriteria criteria);

}