public long getCacheCulls(final Duration duration) {
        final long millis = duration.toMillis();
        if(millis > MAX_CULL_COUNT_PERIOD) {
            throw new IllegalArgumentException("Request duration exceed maximum of " + StringUtils.getFullElapsedTime(duration));
        }
        cullCacheTimes();
        final long oldestCullToCount = System.currentTimeMillis() - millis;
        return cullTimes.stream()
            .filter(cullTime -> cullTime >= oldestCullToCount)
            .count();
    }
Removes objects from cache if the cache is too full. "Too full" is
defined as within 3% of the maximum cache size. Whenever the cache is
is too big, the least frequently used elements are deleted until the
cache is at least 10% empty.
xmppserver/src/main/java/org/jivesoftware/util/cache/DefaultCache.java